MrExcel Consulting
Your One Stop for Excel Tips & Solutions

Find last cell with xlup


Posted by Mark Henry on February 03, 2002 7:55 PM

I cant seem to make this work. How do I find the last cell in a row. eg. I have a figures in cells A2:A65. The I wish to run this "small" macro that will zap me to A66 for another entry. I have been told it's something like A65520.xlup but can't figure out the correct code. Please excuse mu Dumbness.
Thank you
Mark.

Posted by Ivan F Moala on February 03, 2002 8:08 PM

Range("A65536").End(Xlup)

Posted by Richard S on February 03, 2002 8:22 PM

Question, Ivan

Ivan,
If he has data in cell A65, and wants to get to A66, will this work, or will it take him to A65? Does he need some sort of offset command as well?
Richard

Posted by Ivan F Moala on February 03, 2002 10:26 PM

Re: Question, Ivan

Richard
You are correct, I was just giving him
the proper syntax....if I had of anticipated
further then it should be;
Range("A65536").End(xlUp).Offset(1, 0).Select

or something along those lines depending on
how he is using it.

Thanks for that Richard

cheers

Ivan