MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Named ranges

Posted by Jaime de la Isla on June 28, 2001 10:24 AM

Is there a way to assign multiple ranges to the
same name and toggle between them?

Example: When month = 1 thru 6, name = A1:D10 in sheet 1
When month = 7 thru 12, name = A1:d10 in sheet 2

Posted by Aladin Akyurek on June 28, 2001 10:40 AM


Here is one way.


where an array constant is used as a lookup table. You can expand this table at will [ If you need more help on this concept, just ask. ]

And name the cell of the formula via the Name Box.

Lets say it's named as ThisSheet.

You need to invoke INDIRECT(ThisSheet) in formulas in order to access the range ThisSheet really refers to.


Posted by lenze on June 28, 2001 10:59 AM

Yes; First name the two ranges individually (Ex Rng1 & Rng2). Then choose Insert>Name>Define and create a range name (Ex YourRange). Then in the refers to field enter =IF(Month<7,Rng1,Rng2) where Month is the name of the range where the month value resides. Now to toggle based on the month value, chosed Edit>Go To>and enter YourRange in the reference box. You can also use a hyperlink to YourRange or a command button.