View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK[_3_] NickHK[_3_] is offline
external usenet poster
 
Posts: 415
Default Multiple range selection

You have a few options that can be combined:
1 - Used Named ranges: select some of the ranges that are related and give
them a name in the drop down at the top left e.g. rngData1
2 - Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
set rng1=range("A1:G6,H7,M89:U100,rngData1)
set rng2=range("C13,D15:F67)
3 - set rng3=Union(rng1,rng2)
rng3.select
The limit on a Union is 30 ranges, but you can build those from the other
techniques.

NickHK

"I. N. Manoussopoulos" ...
Hi,
Could someone help in the following problem?
I need to select several ranges of different sizes simultaneously. While I
have managed to select and store all of them separately, in an array, I
haven't been able to recall and "merge' them after storage, in a single
multiple range. I have tried to do so using the Union method but it is
impossible to write 80 to 90 objects in it, to be merged. Is there any
else
more efficient method or code?
Thanks a lot