I have a VBA Macro that is working with a very large dataset. In my dataset I have ~44000 rows. I want to count this within the macro and have tried to use the top methods shown here.
I take variable sncountmax and make it equal to one of the methods in the link above.
sncountmax = Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row
Even though the sheet contains 44000 rows sncountmax will remain set to whatever it was previously set to.
EDIT: I have since checked and no other macro functions are executing on this sheet. I tried to remove duplicates using the macro and this did not work, but removing the duplicates in Excel did.