Skip to content

Using Excel VBA to create a script that loops through stock data and retrieves ticker name, yearly change and total stock volume traded.

Notifications You must be signed in to change notification settings

Alvin1359/stock-market-scripts-vba

Repository files navigation

VBA - Stock Market Scripts

Repository containing VBA Homework task

  • .bas files contain VBA scripts to analyse a multiple year stock market dataset
  • .jpg files contain results

Created with:

Microsoft Excel Analysis ToolPak

alphabetical_testing.xlsx has been provided to run the VBA scripts on as the original dataset is too large to be uploaded here

Please run code in the following order for best results:

1. Ticker_and_Total_Stock_Volume.bas
2. Yearly_and_Percent_Change.bas
3. Greatest.bas

This challenge involves analysing a stock market dataset using VBA scripts to output:

  • Ticker Symbol
  • Yearly and Percent Change from opening to closing price
  • Total Volume of stock traded for each ticker
  • Greatest % Increase (Challenge)
  • Greatest % Decrease (Challenge)
  • Greatest Total Volume of stocks traded (Challenge)

Conditional formatting is also used to highlight positive changes in green and negative changes in red

Ticker_and_Total_Stock_Volume.bas

  • Creating titles for summary table for ticker, yearly change, percent change and total stock volume
  • Find values for ticker and total stock volume and input values into summary table

Yearly_and_Percent_Change.bas

  • Find values for yearly change and percent change and input values into summary table
  • Changing formatting to Percentage

Greatest.bas

  • Creating summary table for bonus challenge
  • Find values for ticker, value, greatest % increase, greatest % decrease and greatest total volume

About

Using Excel VBA to create a script that loops through stock data and retrieves ticker name, yearly change and total stock volume traded.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages