excel last used row

The solution for “excel last used row” can be found here. The following code will assist you in solving the problem.

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)

MsgBox (“The last used column is: ” & rLastCell.Column)
MsgBox (“The last used row is: ” & rLastCell.Row)

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts