I have written vba for a macro which loops through a data extract, looks if a row contains a value in a certain column and if so, then performs some data copy/move functions. This is to loop until the end of the rows of data in the file.
Everything works well except the last row of data if it contains data in the requisite column, doesn't trigger the actions. It's fixed if I re-run the macro. But ideally it would complete property in one run. Given I am setting finalrow at the beginning and then inserting rows, I am guessing this is causing the last row to be missed. But I added an incremental +1 to finalrow within the loop which seemed to work for all rows except last. Not sure why. Any help appreciated (i've removed code not critical to the issue):
Bookmarks