Dears,
I was thinking the below codes would bring me to the last non-bank row in a column:
Sub commandtryanderror()
Range("a1").End(xlDown).Select
End Sub
However, I found if there is only the cell A1
has content, the above codes would bring me to the end row in excel, that is row number 1048576
but if there are contents in cell A2
and A3
, the above codes will bring me to A3
, and that is what I want, can you tell me why and how should I correct the program? Thanks.