Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sub LastColumnInOneRow()
'Find the last used column in a Row: row 1 in this example
Dim LastCol As Integer
With ActiveSheet
LastCol = .Cells(1, .Columns.Count).End(xlToLeft).Column
End With
MsgBox LastCol
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment