Indirect on named cell

Skovgaard

Board Regular
Joined
Oct 18, 2013
Messages
197
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Can anyone explain why Indirect("fMMBUAR") doesn't work on below reference?

1618385524085.png


/Skovgaard
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Unless the value in Quote!$O... is a string of cell reference (e.g. A1), INDIRECT will lack a valid cell reference.

Is it the cell value in Quote!$O you are looking for? Then "=fMMBUAR" should work.
 
Upvote 0
To take that one step further, what row are you entering the "=fMMBUAR" on and what is in the content of Quote!$O with the same row number.
If its not a valid Cell reference or range name, it will return #REF!,
if its pointing to an empty cell is will return 0.
 
Upvote 0
You can't use INDIRECT with a dynamic named range like that. It will only work with a fixed range/address.
 
Upvote 0
Unless the value in Quote!$O... is a string of cell reference (e.g. A1), INDIRECT will lack a valid cell reference.

Is it the cell value in Quote!$O you are looking for? Then "=fMMBUAR" should work.

I have a table with several things to lookup. In this table, could one cell have the value "fMMBUAR".
fMMBUAR is created as a named range, in below example A5:A7 (Dynamic).
In C5:C7 (dynamic) I would like to retrieve the value of the correspondent row in column A.

It is important, that the lookup "name" is picked from the lookup table.

Maybe Indirect isn't the proper way to do so, in this case I'm looking for other suggestions.


1618391903384.png


/Skovgaard
 
Upvote 0
What did you test? =INDIRECT("fMMBUAR")?

I tried to replicate Skovgaard's scenario.

20210414 Indirect of a range name containing Index.xlsx
ABNOP
1retrieving this value indirectly ---->10Column used in index function
2Test using a range name "RetrieveThis" in the Instead of a cell reference ---->20
3
4
5Basic formula10B1
6Moved Index part to a range name20RetrieveThis
7Moved Index part to a range name and ref Quote sheet20
8
Sheet1
Cell Formulas
RangeFormula
B5B5=INDIRECT(INDEX($O:$O,ROW(),0))
B6B6=INDIRECT(fMMBUAR)
B7B7=INDIRECT(fMMBUAR_Quote)
Named Ranges
NameRefers ToCells
fMMBUAR=INDEX(Sheet1!$O:$O,ROW(),0)B5:B6


20210414 Indirect of a range name containing Index.xlsx
ANOP
1Column used in index function
2
3
4
5
6
7RetrieveThis
8
Quote


1618396005594.png
 
Upvote 0
=INDIRECT(fMMBUAR) is not the same as =INDIRECT("fMMBUAR")

The original situation appears to be a cell containing the name of the range, hence the use of INDIRECT. That is equivalent to =INDIRECT("fMMBUAR"), not =INDIRECT(fMMBUAR). The latter will evaluate whatever fMMBUAR refers to and pass that to INDIRECT.
 
Upvote 0
I have a table with several things to lookup. In this table, could one cell have the value "fMMBUAR".
fMMBUAR is created as a named range, in below example A5:A7 (Dynamic).
In C5:C7 (dynamic) I would like to retrieve the value of the correspondent row in column A.

It is important, that the lookup "name" is picked from the lookup table.

Maybe Indirect isn't the proper way to do so, in this case I'm looking for other suggestions.


View attachment 36660

/Skovgaard
I assume there are other customized ranges and you'd like to invoke them by typing in B1?

I cannot think of a simple solution, other than listing all the ranges in a IFS() or CHOOSE(). (Assuming you have Office 365, btw better to complete that in your profile)
Excel Formula:
=CHOOSE(MATCH(B1,{"fMMBUAR","AA","BB"},0),fMMBUAR,2,3)

Would be interested to know if there's a function for this task.
 
Upvote 0

Forum statistics

Threads
1,215,368
Messages
6,124,520
Members
449,169
Latest member
mm424

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