Archive of Mr Excel Message Board


Back to Excel VBA archive index
Back to archive home

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.

Check out our Excel VBA Resources

Range("A65536").End(Xlup)

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


Question, Ivan

Posted by Richard S on February 03, 2002 8:22 PM
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


Re: Question, Ivan

Posted by Ivan F Moala on February 03, 2002 10:26 PM
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


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.