Hello!
I have the following code in my macro:
EndRow = Range("A16").End(xlDown).Row
I am using that code to identify the last row with data in it. For example, if I have numbers entered in cells A16, A17, and A18, the code finds the last row as row 18. However, the error occurs if I only have a number in cell A16. Even with no numbers in the subsequent rows, the EndRow command jumps to the last line of the entire spreadsheet (65536). How can I change the code so that if I only have 1 row of data, the EndRow stops at A16?
Thanks,
Margaret
I have the following code in my macro:
EndRow = Range("A16").End(xlDown).Row
I am using that code to identify the last row with data in it. For example, if I have numbers entered in cells A16, A17, and A18, the code finds the last row as row 18. However, the error occurs if I only have a number in cell A16. Even with no numbers in the subsequent rows, the EndRow command jumps to the last line of the entire spreadsheet (65536). How can I change the code so that if I only have 1 row of data, the EndRow stops at A16?
Thanks,
Margaret