Finding last non-empty column in row...
MsgBox Cells(Columns.Count, "2").End(xlLeft).Column
should be xlToLeft rather than xlLeft
"Mika" wrote in message
...
This code works fine:
MsgBox Cells(Rows.Count, "A").End(xlUp).Row
But this does not:
MsgBox Cells(Columns.Count, "2").End(xlLeft).Column
Any ideas how it should be changed to work?
Thanks!
Mika.
|