VLOOKUP can But CHOOSE & INDIRECT can't?????

excelindianfanclub

Board Regular
Joined
Oct 20, 2012
Messages
64
dear experts,
greetings to all,

Created Data Validation on cellS C8 & C11 using values from range D3:D5.When i select the value from data validation list on Cell C8, the CHOOSE,COLUMNS and INDIRECT functions are giving only one correct value (i used Ctrl+Shift+Enter) and are giving VALUE error when i drag the formula in cell E8 towards my right. But When I select a value from data validation cell C11, the functions VLOOKUP and COLUMNS give me what I want say here when I select "Roll" from the selection list on cell C11, the ranges E11:I11 are filled with Roll 1,Roll 2,....Roll 5 When i drag the formula in Cell E11 towards my right.Please give me explanation Why the error occurs??? and HOW do to rectify this error??.


CDEFGHI
3BearingBearing 1Bearing 2Bearing 3Bearing 4Bearing 5
4RollRoll 1Roll 2Roll 3Roll 4Roll 5
5RiceRice 1Rice 2Rice 3Rice 4Rice 5
6
7
8BearingBearing 1#VALUE!#VALUE!#VALUE!#VALUE!
9 =CHOOSE(COLUMNS($E8:E8),INDIRECT($C8))
10
11RollRoll 1Roll 2Roll 3Roll 4Roll 5
=IFERROR(VLOOKUP($C$11,$D$3:$I$5,COLUMNS($E11:E11)+1,),"")

<tbody>
</tbody>
 
Last edited:

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Using your posted data...
This regular formula begins the list if items for the C8 selection
E8: =INDEX($E$3:$I$5,MATCH($C8,$D$3:$D$5,0),COLUMNS($E:E),1)

Copy that formula across through I8 and into E11:I11

Is that something you can work with?
 
Upvote 0
Dear Ron,
Thanks for reply.but my question is why i am getting error value while dragging the formula =CHOOSE(COLUMNS($E8:E8),INDIRECT($C8)) in cell E8 towards my right Using CHOOSE & INDIRECT.when i use this formula in cell E8,it works and returns value.but i can't get a clue why the hell error occurs When copying to next cell!!. please give me reason why do CHOOSE and INDIRECT functions give error
 
Upvote 0
Hi

please give me reason why do CHOOSE and INDIRECT functions give error
You gave CHOOSE() only one parameter to choose from. And that parameter is INDIRECT($C8).
If you F9 your formula then you will see that the result looks something like this:
{"Bearing 1"."Bearing 2"."Bearing 3"."Bearing 4"."Bearing 5"}
It's an array. And Excel is just displaying the first item in the cell.
Items from an array can only be looked up via INDEX().
CHOOSE() needs a list of parameters.
 
Upvote 0

Forum statistics

Threads
1,215,460
Messages
6,124,949
Members
449,198
Latest member
MhammadishaqKhan

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