Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default RANGE SELECTION

Suppose I want to select a range of empty cells. The following piece of code
also selects the last non-blank cell as well:

Range(Selection, Selection.End(xlUp)).Select

I want the selection to be of only blanks, in othjer words SHIFT + Down
Arrow once.

Looking forward for your guidance!

Thanx in advance,

Regards

FARAZ!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default RANGE SELECTION

Range(Selection, Selection.End(xlUp).Offset(1, 0)).Select
--
Gary''s Student - gsnu200760
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default RANGE SELECTION

<<Suppose I want to select a range of empty cells.

Where is the current selection? In a range of cells that are already blank,
or in the middle of a range of data?

<<The following piece of code also selects the last non-blank cell as
well:
Range(Selection, Selection.End(xlUp)).Select

No, it does not. The above code selects from the current selection up to
the end of the data block or end of blank cells, depending on where the
selection is when you start.

<<I want the selection to be of only blanks, in othjer words SHIFT + Down
Arrow once.

Shift+Down Arrow is conflicting with the code you showed above (xlUp)!
Shift+Down Arrow will increase the selection in the DOWN direction, not UP,
as performed by the code above.

--
Regards,
Bill Renaud



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
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Range(Selection, Selection.End(xlToRight)).Select Dave Birley Excel Programming 2 June 6th 07 04:53 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM
Creating range name for a range selection Mervyn Thomas Excel Programming 1 January 26th 04 05:18 PM


All times are GMT +1. The time now is 12:58 AM.

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

About Us

"It's about Microsoft Excel"