Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default my macro is remembering specific range instead of 1st to last

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default my macro is remembering specific range instead of 1st to last

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

"Pam @ Joyce" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
DS DS is offline
external usenet poster
 
Posts: 117
Default my macro is remembering specific range instead of 1st to last

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

"Pam @ Joyce" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default my macro is remembering specific range instead of 1st to last

Thank you so much Mike - this has done the trick.

"Mike H" wrote:

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

"Pam @ Joyce" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro - specific range puiuluipui Excel Discussion (Misc queries) 3 May 10th 09 11:33 AM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan[_2_] Excel Programming 4 June 17th 06 04:13 PM
Macro to Specific Cells in a Range Magnivy Excel Programming 4 April 24th 06 05:57 PM
macro that sumif a specific range jane Excel Programming 1 January 21st 04 11:20 PM


All times are GMT +1. The time now is 03:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"