In this third and final installment of the popular VBA and Excel for Engineers and Scientists series, we will look at one of the most important techniques for extending Excel with VBA, the Range Object. I’ll show you the best way to refer to single cells, multiple cells, how to get values from them and put values back into ranges using the VBA. And we’ll program up a simple Monte Carlo Simulation example and lastly we’ll look at how to read and write to text files and to manipulate files and folders in Windows.
Visual Basic for Applications or VBA used in conjunction with Microsoft Excel is a tool that many scientists and engineers have yet to take full advantage of. This article is the first in a series designed to provide you with the basic understanding of how to use VBA and Excel in your practice.