Answers for "vba last column with empty"

VBA
1

excel vba last column with data

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)
Posted by: Guest on September-04-2021

Code answers related to "vba last column with empty"

Code answers related to "VBA"

Browse Popular Code Answers by Language