naming multiple ranges

R

ranswrt

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
 
B

Barb Reinhardt

Have you tried

Set rng1 = Union(xcell.Offset(2, 2), xcell.Offset(11, 2))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top