Created
December 22, 2016 09:34
-
-
Save ndthanh/f07ff7d2b6957748c69dd60bd290a199 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Range_Find_Method() | |
'Finds the last non-blank cell on a sheet/range. | |
Dim lRow As Long | |
Dim lCol As Long | |
lRow = Cells.Find(What:="*", _ | |
After:=Range("A1"), _ | |
LookAt:=xlPart, _ | |
LookIn:=xlFormulas, _ | |
SearchOrder:=xlByRows, _ | |
SearchDirection:=xlPrevious, _ | |
MatchCase:=False).Row | |
MsgBox "Last Row: " & lRow | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment