Original script times: 0.660 seconds (2017 data) and 0.668 seconds (2018 data)
Conclusion: Pros and Cons of Refactoring Code
In general, the advantages of refactoring a code is that it improves the effectiveness and sustainability of a software program.
The downside that we sometimes see is that refactoring incorrectly or imprecisely may lead to impaired functioning of the software as well as holes in the software security that could make it more susceptible to hackers.
Refactoring my VBA script, my ran noticeably faster than it had with the original script. The downside in refactoring this script was it was tedious and time-consuming. I had to constantly check the codes that I was inputing were effectively and correctly running the analysis.
About
Analyzed stock data on a list of green energy stocks using VBA