View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default multiple ranges in cell notation

Then you want
Set My_multiple_Range =
Union(Cells(x,y),cells(x+2,y+2),Cells(x+7,y),cells (x+7,Y+7))

It's not that hard.
--
HTH,
Barb Reinhardt



"John" wrote:

I wasn't clear

I want something like

My_multiple_Range =
Range(Cells(x,y),cells(x+2,y+2):Cells(x+7,y),cells (x+7,Y+7)

So that I can use x and y as variables
John

Gary Keramidas wrote:
you can try this:

Set My_Multiple_Range = Union(Range("a1:a3"), Range("a7:a9"))