End of the column

G

Greegan

I'm trying to record a macro that will take me to the end of a selected
column.
I know ctrl+end takes me to the end of the sheet, however any one column
could have 44 lines and the next will have 24.
Is there a hotkey that takes me to the end of a selected column? I could
work on my own from there.
thx

And thanks for the help on my other questions

G
 
M

Myrna Larson

The hot key is End,Down, but within VBA code you would write

Range("A1").End(xlDown).Select

Be aware that you'll get to the right place with that ONLY if there are no
embedded blank cells in column A. If there are, you can try

Range("A65536").End(xlUp).Select

which will take you to the last used cell in column A.
 
P

Peo Sjoblom

Ctrl + down arrow

for a macro

Sub testme()
Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select
End Sub

will find the last cell in the active column

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 

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

Top