Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Adding to a selection?

Can someone tell me how to add to an existing selection?

For example:

Range("A1, C1").Select
.....then later on I want to keep "A1" and "C1" selected, but add on
more selected more cells.

In "english" it would be Selection = Selection + New Selection

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Adding to a selection?

You can use Union to combine ranges. But it's not usually required to select
any range to work on them.

dim myRng as range
set myrng = .range("a1:C1")
'myrng.select

set myrng = union(myrng, range("d3:d77"))
'myrng.select




wrote:

Can someone tell me how to add to an existing selection?

For example:

Range("A1, C1").Select
....then later on I want to keep "A1" and "C1" selected, but add on
more selected more cells.

In "english" it would be Selection = Selection + New Selection

Thanks!


--

Dave Peterson
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
Fill/Expand Selection adding placeholders to Decimals awalker Excel Discussion (Misc queries) 3 April 26th 10 06:19 PM
Adding another selection to a drop down list ELEMSI Excel Discussion (Misc queries) 1 October 29th 08 04:20 PM
adding to different totals dependant upon selection from drop down Shaunnyb Excel Worksheet Functions 0 April 4th 06 10:00 PM
Adding time selection to pop-up calendar RMF Excel Programming 1 March 6th 06 10:55 PM
Adding current selection RICOUK Excel Programming 3 August 27th 05 10:31 PM


All times are GMT +1. The time now is 11:31 PM.

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"