I'm pretty new to VBA programming and need some help with a dynamic autofill please.
I have a spreadsheet that pulls in a dataset from a database which is similar to the area highlighted yellow on the attached mock up.
Once this dataset is in my workbook I want to autofill a simple formula against each line. I've done this for the example attached with the Macro 'FillFormula'.
My issue is that the size of the dataset can vary depending on some conditions and so the number of rows of data is dynamic. How do I edit my code so that the autofill always starts at cell D1 and keeps going until it hits a blank cell in column A then stops?
Any and all help appreciated.
Ed
VBA Example.xlsm
Bookmarks