Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2004

Tip: Looking for answers? Try searching our database.

Muliple names in a range?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cliff - 03 Apr 2004 01:25 GMT
Is it possible to have multiple named references within a range ID, for example:

Worksheets("Sheet1").Range("Year_1", "Year_3").Value = 0

where both Year_1 and Year_3 are named ranges themselves?

Cliff
Dave Peterson - 03 Apr 2004 01:34 GMT
You can use a union of the two ranges:

Option Explicit
Sub testme()
  With Worksheets("sheet1")
       Union(.Range("year_1"), .Range("year_3")).Value = 0
   End With
End Sub

But this just seems more straightforward to me:

Option Explicit
Sub testme()
  With Worksheets("sheet1")
       .Range("year_1").Value = 0
       .Range("year_3").Value = 0
   End With
End Sub

> Is it possible to have multiple named references within a range ID, for example:
>
[quoted text clipped - 3 lines]
>
> Cliff

Signature

Dave Peterson
ec35720@msn.com

Cliff - 03 Apr 2004 01:43 GMT
> You can use a union of the two ranges:
>
[quoted text clipped - 22 lines]
>>
>>Cliff

Thanks, Dave...that works for me.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.