Created
July 17, 2020 16:16
-
-
Save GabrielMMelo/381125479e6a5de9df4d07297ca940c0 to your computer and use it in GitHub Desktop.
Reliable way to get last used cell in Excel using vba
This file contains hidden or 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
Dim rLastCell As Range | |
Set rLastCell = ws.Cells.Find(What:="*", After:=ws.Cells(1, 1), LookIn:=xlFormulas, LookAt:= _ | |
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, MatchCase:=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment