Indirect Help

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Hi, using INDIRECT but cannot get it to work in this particular instance

I have a static named range (just contains a single number) called KBMB.

Cell G7 contains "KB" and cell H7 contains "MB".

INDIRECT(G7&H7) does not provide me with any result, just get a #REF error

Formula evaluates to INDIRECT("KBMB")

?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
When you list names in the Name Manager, what attributes show for name KBMB, under Refers To, and Scope? I assume that this is all within the same workbook?
 
Upvote 0
Yes refers to workbook...

Thought it would interpret as a reference, not at "KBMB" text
 
Upvote 0
The name contains a value, 0.96456

When I type =KBMB ... the cell correctly displays 0.96456

When I type =INDIRECT(G7&H7) and analyse the formula, it interprets it as =INDIRECT("KBMB")

Thoughts?
 
Upvote 0
So, it doesn't refer to a range at all, but to a value stored in a defined name. Have you thought of using VBA to fetch the name contents, in a function?
 
Upvote 0
No because I have alot of different rows. The workbook doesn't allow VBA (security)

My data looks like this :

FROM...TO....CONV
KB.....MB....0.0009765625
MB.....KB....1024
MIN....SEC...60
SEC....MIN...0.1666666667

The conversion factors are saved as named ranges e.g. KBMB, MINSEC, SECMIN

So need a dynamic formula to pull the correct factor from the named range
 
Upvote 0
It's not a named range. BUT, if you put your values in cells in a sheet, and name them accordingly, then all will work.
 
Upvote 0
Hmmm it works. Why does it do that?

Have the value in a cell, it can be references ok. But stored in a defined name and dosn't work?
 
Upvote 0
I guess it has to do with the way Excel resolves references. You were trying to do something that didn't involve references at all. Then Excel hit a brick wall.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,696
Members
452,938
Latest member
babeneker

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