method to determine Last Column with Data, in one row


Sub LastColumnWithData_xlToLeft()

Dim lastColumn As Integer

lastColumn = ActiveSheet.Cells(2, Columns.Count).End(xlToLeft).Column

MsgBox lastColumn

End Sub

Comments

Popular posts from this blog

50 Excel VBA Oral Interview Questions