Indirect Formula Error

decent_boy

Board Regular
Joined
Dec 5, 2014
Messages
130
Office Version
  1. 2016
Platform
  1. Windows
Hi
I am using indirect formula for dependent drop down list in mentioned below data

Dependent-Drop-Down-List-Excel_v2.xlsx
ABCDEFG
1FruitsVegetables
2MangoPotatoDrop Down 1Drop Down 2Formula
3AppleTomatoVegetablesTomatoTomato
4GrapesSpinach
5StrawberryOnion
6KiwiCucumber
Dependent Drop Down
Cell Formulas
RangeFormula
G3G3=INDIRECT($D3)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E3Expression=ISERROR(VLOOKUP(E3,INDEX($A$2:$B$6,,MATCH(D3,$A$1:$B$1)),1,0))textNO
Cells with Data Validation
CellAllowCriteria
D3List=$A$1:$B$1
E3List=INDIRECT($D$3)


But When I change vegetable name to Alan indirect function show error and does not work, can anybody help me on this

Dependent-Drop-Down-List-Excel_v2.xlsx
ABCDEFG
1FruitsAlan
2MangoPotatoDrop Down 1Drop Down 2Formula
3AppleTomatoAlan#REF!
4GrapesSpinach
5StrawberryOnion
6KiwiCucumber
Dependent Drop Down
Cell Formulas
RangeFormula
G3G3=INDIRECT($D3)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E3Expression=ISERROR(VLOOKUP(E3,INDEX($A$2:$B$6,,MATCH(D3,$A$1:$B$1)),1,0))textNO
Cells with Data Validation
CellAllowCriteria
D3List=$A$1:$B$1
E3List=INDIRECT($D$3)
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Do you have a named range called Alan?
 
Upvote 0
As Fluff alluded to, I think that INDIRECT is working off of named ranges, not column titles.
You probably have a named range named "Vegetables", but not one named "Alan", which would explain your issue.
 
Upvote 0
If I do not want to create name list then how can it be done without named range so when I change it, it will not show error
 
Upvote 0
The INDIRECT function must use a valid cell/range reference, which would be an explicit cell/range address, or a named range.
(The following taken from Microsoft Help on INDIRECT function: INDIRECT function - Microsoft Support)

1688050692275.png


Those appear to be the only two options when using the INDIRECT function to refer to a range on your sheet.
1. hard-coded address
2. named range
 
Upvote 0
You could try
Excel Formula:
=INDEX($A$2:$B$6,,MATCH(D3,$A$1:$B$1,0))
 
Upvote 0
Solution
The INDIRECT function must use a valid cell/range reference, which would be an explicit cell/range address, or a named range.
(The following taken from Microsoft Help on INDIRECT function: INDIRECT function - Microsoft Support)

View attachment 94439

Those appear to be the only two options when using the INDIRECT function to refer to a range on your sheet.
1. hard-coded address
2. named range
That is great and thanks so much for explaining of it.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,181
Members
452,615
Latest member
bogeys2birdies

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