Ok
I have tested these for you.
The first one gives you the last used cell in column A regardless of the value of i.
The second one returns 1 whatever the value of i
The third one simply returns an error.
![]()
Sub Macro1() ' ' Macro1 Macro i = 20 temp = Range("a" & i).End(xlUp).Row temp = Cells(Rows.Count, i).End(xlUp).Row temp = Range(Rows.Count, "a").End(xlUp).Row End Sub
Bookmarks