my macro is remembering specific range instead of 1st to last

P

Pam @ Joyce

I need my macro to include shift+end+down arrow to select from 1st to last in
a column, as the spreadsheet grows it only remembers the specific range.
what do I need to do to have it select from 1st to last in a column? Can
someone help pls
 
M

Mike H

Hi,

This will select the used range in column A

lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Range("A1:A" & lastrow).Select

Mike
 
D

DS

Hi Pam,

This selects from Cell A1 to the last entry in Col A, in the same way as
selecting A1, then pressing SHIFT+CTRL+DOWN ARROW.

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

HTH
DS
 

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