find last column with data
hi
try somedthing like this......
Sub findcol()
Dim c As Long
c = Cells(1, Columns.Count).End(xlToLeft).Column
MsgBox "The Last column is " & Cells(1, c).Address
'Cells(1, c).Select 'optional
End Sub
regards
FSt1
"thomas donino" wrote:
I have a file that at times will have various number of columns. How do I
find the last column with data. All rows will have data in the same columns.
I am starting at A2
|