Sub FindLastRowInA()
Dim LstRw As Long
LstRw = Cells(Rows.Count, "A").End(xlUp).Row
If LstRw = 1 Then
MsgBox "There is no data in column A"
Else
MsgBox "The last row with data in column A is row " & LstRw
End If
End Sub
Sub DetermineUnknownRange()
Dim LstRw As Long, Rng As Range
LstRw = Cells(Rows.Count, "A").End(xlUp).Row
If LstRw = 1 Then
MsgBox "There is no data in column A"
Else
Set Rng = Range("A1:A" & LstRw)
MsgBox "The Range with data in column A is " & Rng.Address(0, 0)
End If
End Sub