Refering to a named Range using a variable.

fishoutofwater

New Member
Joined
Jul 20, 2011
Messages
38
In column A1, B1 and C1 I have 3 names: Ted, Mary, Casper

Let's say I have named the ranges as follows:

A1 = "Person1"
B1 = "Person2"
C1 = "Person3"

Now, let's say in D1 I have the number 2
In d2 I want to do this:
=Person(D1) which would mean =Person2 which would deliver "Mary"
Now, if I changed D1 to 3, I'd want "Casper" to show up in D2.

In other words, I want to call the data by using the range name, but where I use a variable (in cell D1) to append to the first part of the range name to create the whole range name.

I am sure I can do this, but the syntax stuff I have been playing with is not working at all.

Thanks for any tips on this aspect of working with names!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Excel Workbook
ABCD
1TedMaryCasper2
2Mary
Sheet1
Excel 2007
Cell Formulas
RangeFormula
D2=INDIRECT("Person"&D1)
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,261
Members
452,901
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top