LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Range selection code in a macro

Below is code I wrote to select multiple rows creating a single range

Sheets("Givens").Activat
Rows("22:22").Selec
Range(Selection, Selection.End(xlDown)).Selec

To get me the correct range I need a set of instruction to modify the above range by decreasing by one row from the bottom of the selection. My attempt was for the 4th instruction "Range(Selection, Selection.xlUp).Select" but unfortunately for me it's an improper syntax

Please help
Thank you in advance.
 
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
VBA Code User Range Selection jimbo Excel Discussion (Misc queries) 5 January 5th 10 02:31 AM
Sumeif macro with range selection orquidea Excel Discussion (Misc queries) 14 August 29th 08 03:12 AM
Macro Range Selection Roy A.[_2_] Excel Discussion (Misc queries) 3 March 16th 08 04:38 PM
macro code to get dynamic range ashish128 Excel Discussion (Misc queries) 3 June 15th 07 02:41 PM
macro code to sort a range ashish128 Excel Discussion (Misc queries) 5 August 17th 06 05:52 PM


All times are GMT +1. The time now is 10:51 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"