It is a relatively common practice to add new data to workbook by finding the last row in a worksheet and then going to the next row. In VB this can be done many ways, a popular way by going to the final row of the sheet and hitting end up in code, then going down one. Something like:
Worksheets("Sheet1").Range("A65536").End(xlup).offset(1,0).select
This usually works better than starting at the top and going down, in case the data has some blank cells contained in the set of data in that column.
This method may be WRONG if the dataset has an autofilter active and the list is filtered. If for example the last cell that is not blank in col A is A66, and the list is FILTERED so that the last cell viewed is A45, when the above code is run, cell A46 will be selected NOT A67 (Worksheets(“Sheet1”).Range(“A65536”).End(xlup) will get you to A45 NOT A66, the offset will take you to A46).
This can be disastrous in that you could start overwriting data!
To prevent this, if you use a filtered list, is to make sure that the data is not filtered (the filter can be active, but all the rows should be showing). This can be done with something like:
If Worksheets("Sheet1").FilterMode then Worksheets("Sheet1").ShowAllData Worksheets("Sheet1").Range("A65536").End(xlup).Offset(1,0).Select
This line can be used even if there is no autofilter since if the autofilter is ON and nothing is filtered OR the autofilter is not selected, the FilterMode is FALSE.
Just something to watch out for and be aware of.
Steve