Variable names for named range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like to reference a named range that is variable.

Let's say I have a Range called "Program_1_2" and A1 = 1 and B1 = 2

How do I do something like this "Program_"&A1&"_"&B1 and get it to display?

Thanks,
Barb Reinhardt
 
Hi Barb,

=INDIRECT("Program_"&A1&"_"&B1)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| I'd like to reference a named range that is variable.
|
| Let's say I have a Range called "Program_1_2" and A1 = 1 and B1 = 2
|
| How do I do something like this "Program_"&A1&"_"&B1 and get it to display?
|
| Thanks,
| Barb Reinhardt
 
I should have posted that I tried using that before I posted this request and
I get a #REF error.
 
Hi Barb,

Are there any invisible characters in A1 or B1? Check with the LEN() function.
I assume you use A1 reference style, not R1C1.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I should have posted that I tried using that before I posted this request and
| I get a #REF error.
|
| "Niek Otten" wrote:
|
| > Hi Barb,
| >
| > =INDIRECT("Program_"&A1&"_"&B1)
| >
| > --
| > Kind regards,
| >
| > Niek Otten
| > Microsoft MVP - Excel
| >
| > | > | I'd like to reference a named range that is variable.
| > |
| > | Let's say I have a Range called "Program_1_2" and A1 = 1 and B1 = 2
| > |
| > | How do I do something like this "Program_"&A1&"_"&B1 and get it to display?
| > |
| > | Thanks,
| > | Barb Reinhardt
| >
| >
| >
 

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

Back
Top