RATIONALE
This Excel VBA for Beginners series is aimed at Excel users just starting out with code, or those who have never coded, and who are curious about it. Too often, Excel users find themselves engaged in tricky manual tasks that take up time and create stress. Data cleansing is one such task. If you have ever gone through a list of data and looked for mistakes (in the spelling of people’s names, for example) then you have done a data cleansing task. It probably was not much fun! With a little coding knowledge, it is possible to dramatically speed up this kind of task, reduce the stress, and kick start your coding journey. Welcome to Excel VBA for Beginners!
Click here for the Excel for beginners files
This is exactly what we do. Using a For Each construct, we define a range of interest and establish a basic loop. It would be possible to define this loop in static terms by using notation such as range(“B3:B200”); if we took this approach, however, what would happen if data were added to the list? It would be discluded from the process. It is much better, therefore, to use a dynamic reference that could handle additions to the data. In the video, we create an Excel formula to measure the size of the dataset, and then reference its cell in the code. In doing so, we create a thing of beauty: worksheet formulae and VBA code working together in harmony. The result: awesome dynamic functionality.