Data Analytics Boot Camp - Module 02 - VBA Scripting
VBA Challenge
Screenshots of the results for each worksheet (per-Quarter stock summary and 'greatest' statistics) are given in the following files in the screenshots subfolder:
- screenshot_VBA_Challenge_Result_Worksheet_Q1.png
- screenshot_VBA_Challenge_Result_Worksheet_Q2.png
- screenshot_VBA_Challenge_Result_Worksheet_Q3.png
- screenshot_VBA_Challenge_Result_Worksheet_Q4.png
The '.xlsx' files provided in this Challenge's Starter_Code were converted to '.xlsm' so they could store VBA source code.
Implentation development and testing were performed using the supplied alphabetical_testing data set. The '.xlsm' file and the extracted VBA code '.vbs' file from that stage are archived in the 'alphabetical_testing' subfolder.
Additional code comments were added to that VBA code to produce the final version saved as CalculateAndDisplayStockInformation.bas. That VBA code was loaded into Module1 in Multiple_year_stock_data.xlsm and run from there to produce the final results.
In order to match the sample result provided in the 'Bonus' section of this Challenge, the 'greatest' stock is calculated on a per-worksheet (per-quarter) basis, not the 'greatest' overall.
The following references were used in the development of the solution for this Challenge.
Used in developing the contents of this README.md file!
- https://www.markdownguide.org/cheat-sheet/
- https://code.visualstudio.com/docs/languages/markdown#_markdown-preview
- git mv https://git-scm.com/docs/git-mv
- Adding your SSH key to the ssh-agent https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent
- https://stackoverflow.com/questions/56680417/how-to-import-a-macro-to-excel-by-vbs
- https://www.reddit.com/r/vba/comments/1c5g8s/how_to_import_and_run_external_macro_bas_file/
- https://support.microsoft.com/en-au/office/work-with-vba-macros-in-excel-for-the-web-98784ad0-898c-43aa-a1da-4f0fb5014343
- https://stackoverflow.com/questions/43352194/how-to-save-macro-code-as-vbs
- https://www.mrexcel.com/archive/vba/saving-an-excel-macro-as-a-vbs-file/
- https://learn.microsoft.com/en-us/office/vba/api/excel.worksheet.usedrange
- https://www.wallstreetmojo.com/vba-usedrange/
- https://learn.microsoft.com/en-us/office/vba/api/excel.worksheet#properties
- https://trumpexcel.com/vba-worksheets/
- https://excelmacromastery.com/excel-vba-worksheet/
- https://stackoverflow.com/questions/56259496/calling-a-sub-in-vba-with-multiple-arguments
- https://www.wallstreetmojo.com/vba-call-sub/
- https://learn.microsoft.com/en-us/office/vba/language/concepts/getting-started/declaring-constants
- https://www.mrexcel.com/board/threads/global-const-vba-best-practices.362948/
- https://stackoverflow.com/questions/365125/how-do-i-set-the-background-color-of-excel-cells-using-vba
- https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/cc296089(v=office.12)?redirectedfrom=MSDN
- https://www.excel-easy.com/vba/examples/background-colors.html