Vba Find Last Column In A Row With Data

[Solved] Vba Find Last Column In A Row With Data | Vb - Code Explorer | yomemimo.com
Question : excel vba last column with data

Answered by : vastemonde

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)

Source : | Last Update : Sat, 11 Sep 21

Question : vba find last column in a row with data

Answered by : successful-starling-4ylwg02mukwz

Select All
last_col = Cells(1, Columns.Count).End(xlToLeft).Column

Source : https://www.teachexcel.com/excel-tutorial/1883/find-the-last-column-with-data-in-excel | Last Update : Thu, 20 Jan 22

Answers related to vba find last column in a row with data

Code Explorer Popular Question For Vb