Selecting Till last row

A

Alfred

Hi
I used the following code in a macro
Range(Selection, Selection.End(xlDown)).Select 'the same as
CTRL-SHIFT-DownArrow

This does not work if there is emty rows (only selects till it finds the
first emty row)

Is there another function to select till the last row that is populated ?

Thanks a lot
Alfred
 
G

Gary Keramidas

you can try this

Range(Selection, Cells(Rows.Count, Selection.Column).End(xlUp)).Select
 

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