Macro go to last cell w/ data


Posted by L. D. Bronstein on January 21, 2002 8:33 AM

I need a macro to go to the last cell in column A which contains data. I'm sure it's been asked b4 but couldn't find in a search so will appreciate any help.
Thanks.

Posted by Juan Pablo G. on January 21, 2002 8:34 AM

Range("A65536").End(xlUp).Select [NT]

Posted by suzanne on January 21, 2002 9:07 AM

an additional question..Juan..other columns ???!!!

This takes care of a specific column. What if there are other columns do you have to hard code for each one..or is there a simpler way where I can press a shortcut key on any column and that will take me to the final cell for that column?



Posted by Juan Pablo G. on January 21, 2002 9:14 AM

Re: an additional question..Juan..other columns ???!!!

If you need this in code, use

Cells(65536,ActiveCell.Column).End(xlUp).Select

if you need to use it in Excel directly, you can achieve this by pressing Control + Down, this will take you to the last used cell before a blank cell appears.

Juan Pablo G.