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
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
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
news:46A74C56-FE28-46F9-93C7-607D2B261D24@microsoft.com...
> 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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks