View Single Post
  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default

Use the xlToLeft constant with End. E.g.,

Dim LastCol As Integer
LastCol = Cells(1, Columns.Count).End(xlToLeft).Column
Debug.Print LastCol


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"BillCPA" <Bill @ UAMS wrote in message
...
Is there an equivalent to

'LastRow = Cells(Rows.Count, "A").End(xlUp).Row'

for finding the last column to the right that contains data?

--
Bill @ UAMS