Sub TEST()
Dim xF As Range, xE As Range
With [A1:B10]
Set xE = .Item(.Count) '定位指定範圍的最後一格
Set xF = .Find("*", After:=xE, SearchOrder:=xlByRows, SearchDirection:=xlPrevious) '從最後一格往上找非空
If xE <> "" Then Set xF = xE '若最後一格非空, 則以此格為準
End With
MsgBox xF.Row
End Sub