iferror Index Match - Error

Enzo_Matrix

Board Regular
Joined
Jan 9, 2018
Messages
113
Code:
=IFERROR(INDEX($A$2:$A$60,MATCH(D$1,$A$1,0),MATCH(D$2,$B2:$B60,0)),"Try Again!")

The idea is that if I choose a different cell in 'C' it will give the response from 'B'. However it only functions for the first option chosen in the matrix B1,C1. Everything else produces an error
Part NumberPart numberPart NumberPart Number
1Custom FittingsCustom FittingsCarbon SteelStainless Steel
2Carbon Steel1Try again!Try Again!
3Stainless Steel

<tbody>
</tbody>


Am I missing something in the code?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Is this what you want?
Excel Workbook
ABCDEF
1Part NumberPart numberPart NumberPart Number
21Custom FittingsCustom FittingsCarbon SteelStainless Steel
32Carbon Steel123
43Stainless Steel
Sheet
 
Upvote 0
I need D3 to change it's number depending on the text in D2.

This table has 60 lines in it currently and has the potential to grow and I do not think writing a 60 nested IF statement is the best way to go about it.
 
Upvote 0
Not sure I understand. The formula I gave above will return a part number based on the text in D2. Don't see the need for 60 nested IF statements.
Just need to copy formula across columns as needed.
Excel Workbook
ABCDEF
1Part NumberPart numberPart NumberPart Number
21Custom FittingsCarbon SteelStainless SteelCustom Fittings
32Carbon Steel231
43Stainless Steel
Sheet
 
Upvote 0
So I have come across another issue with this and I'm hoping you can help me out.

This works for 2 columns, but can't get it to work for 4. This might potentially increase in scope as time goes on.

Is it possible to add to the below code to accommodate a 3rd and 4th match or is there a VBA option that can be used in it's place?

Code:
=IFERROR(INDEX(Data!$A$3:$A$31,IFERROR(MATCH($I6,Data!$I$3:$I$31,0),MATCH($I6,Data!$L$3:$L$18,0))),"Try Again!")
 
Upvote 0
How about posting a sample and the result you are looking for.
 
Upvote 0
ABCD
1AL CxE321 Single BraidTank TruckPGP
2SS AMonel SingleSteamAAP

<tbody>
</tbody>





I have lists with Data validation in Columns A:D. If you choose 'Monel Single' it will give '2'. If I choose 'AL CxE' it will give 1. However If I chose anything from column C or D it returns the error message 'Try Again!' as it should.
 
Upvote 0
Try:
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDE
11AL CxE321 Single BraidTank TruckPGP
22SS AMonel SingleSteamAAP
3
4
5FindSteam
62
Sheet
 
Upvote 0
Try this instead of what I have in post #9 above.
It's still an array formula that must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDE
11AL CxE321 Single BraidTank TruckPGP
22SS AMonel SingleSteamAAP
3
4
5FindSteam
62
Sheet
 
Upvote 0

Forum statistics

Threads
1,215,674
Messages
6,126,149
Members
449,294
Latest member
Jitesh_Sharma

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