last column of a row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to know the last filled column of a row. I wrote this lastCol =
cells(1, columns.count) that returns 256. But I have only 101 columns filled
with data. So I was expecting lastCol is equal to 101.

I am doing something wrong to find last filled column number. Can you please
help me?

Nazrul
 
Try this

MsgBox Cells(ActiveCell.Row, "IV").End(xlToLeft).Column
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top