Determine cell address of last entry in a row

  • Thread starter Thread starter NDBC
  • Start date Start date
N

NDBC

I need to find the column number of the last entry in a row. I tried this but
it doesn't seem to work

MaxA = Sheets("A Grade").Cells(Columns.Count, "5").End(xlLeft).Column

I'm trying to find the column address of the last entry in the 5th row down.

Thanks
 
the below will give you the column number of the last entry in Row 1

lngLastCol = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column

If this post helps click Yes
 
Thanks Stanley, I had already modified Jacobs code to that. Thanks again
Jacob. I'm starting to wonder if you ever sleep.
 

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