Loading...
Loading...
Finds the last used column in a specific row of the active worksheet.
Sub GetLastColumn() Dim lastCol As Long lastCol = Cells(1, Columns.Count).End(xlToLeft).Column MsgBox "Last column in row 1: " & lastCol End Sub
RELATED MACROS IN DATA ANALYSIS