Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to name mulitple ranges of cells that aren't connected. I tried:
Set rng1 = Range(xcell.Offset(2, 2), xcell.Offset(11, 2)) Set rng2 = Range(xcell.Offset(14, 2), xcell.Offset(59, 2)) Set rng3 = Range(xcell.Offset(62, 2), xcell.Offset(70, 2)) Set rng = Range(rng1, rng2, rng3) rng.name = "alsestrng" The set rng code doesn't work. How do I need to do this? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have you tried
Set rng1 = Union(xcell.Offset(2, 2), xcell.Offset(11, 2)) -- HTH, Barb Reinhardt "ranswrt" wrote: I need to name mulitple ranges of cells that aren't connected. I tried: Set rng1 = Range(xcell.Offset(2, 2), xcell.Offset(11, 2)) Set rng2 = Range(xcell.Offset(14, 2), xcell.Offset(59, 2)) Set rng3 = Range(xcell.Offset(62, 2), xcell.Offset(70, 2)) Set rng = Range(rng1, rng2, rng3) rng.name = "alsestrng" The set rng code doesn't work. How do I need to do this? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set rng = Union(rng1, rng2, rng3)
rng.Name = "alsestrng" Regards, Peter T "ranswrt" wrote in message ... I need to name mulitple ranges of cells that aren't connected. I tried: Set rng1 = Range(xcell.Offset(2, 2), xcell.Offset(11, 2)) Set rng2 = Range(xcell.Offset(14, 2), xcell.Offset(59, 2)) Set rng3 = Range(xcell.Offset(62, 2), xcell.Offset(70, 2)) Set rng = Range(rng1, rng2, rng3) rng.name = "alsestrng" The set rng code doesn't work. How do I need to do this? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank You
"Peter T" wrote: Set rng = Union(rng1, rng2, rng3) rng.Name = "alsestrng" Regards, Peter T "ranswrt" wrote in message ... I need to name mulitple ranges of cells that aren't connected. I tried: Set rng1 = Range(xcell.Offset(2, 2), xcell.Offset(11, 2)) Set rng2 = Range(xcell.Offset(14, 2), xcell.Offset(59, 2)) Set rng3 = Range(xcell.Offset(62, 2), xcell.Offset(70, 2)) Set rng = Range(rng1, rng2, rng3) rng.name = "alsestrng" The set rng code doesn't work. How do I need to do this? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Naming ranges | Setting up and Configuration of Excel | |||
Naming ranges on multiple worksheets | New Users to Excel | |||
naming multiple ranges | Excel Programming | |||
Naming Ranges | Excel Programming | |||
Naming Ranges | Excel Discussion (Misc queries) |