Sub Range_End_Method()
'Finds the last non-blank cell in a single row or column
Dim LastRow As Long
'Find the last non-blank cell in column A(1)
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
MsgBox "Last Row: " & LastRow & vbNewLine
Range("A2:AF" & LastRow).Select
End Sub
I get message that my last non blank row is 46900 but it does not give me selection of A2::A46900. Instead i get error # 400
Please help me.
'Finds the last non-blank cell in a single row or column
Dim LastRow As Long
'Find the last non-blank cell in column A(1)
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
MsgBox "Last Row: " & LastRow & vbNewLine
Range("A2:AF" & LastRow).Select
End Sub
I get message that my last non blank row is 46900 but it does not give me selection of A2::A46900. Instead i get error # 400
Please help me.