INDEX MATCH with IF help needed

JamieT123

New Member
Joined
Aug 2, 2016
Messages
6
I'm trying to index a column and match with multiple criteria if a1=yes and index
the same column with different criteria if a1=no. Here's a rough example of what
I've tried

{=IF(A1="yes",INDEX(D10:D20,MATCH(Y1&Y2&Y3,A10:A20&B10:B20&C10:C20),
IF(A1="no",INDEX(D10:D20,MATCH(Z1&Z2&Z3,A10:A20&B10:B20&C10:C20),"")}

It works up until the second IF so I think the problem is probably the closing off part, I'm pressing CTRL+SHIFT+ENTER but it doesn't work. It could also be the middle part where I'm closing off the first IF and opening the second, any ideas?
 

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
I think you're just missing some parenthesis. Try this:

{=IF(A1="yes",INDEX(D$10:D$20,MATCH(Y1&Y2&Y3,A$10:A$20&B$10:B$20&C$10:C$20)),IF(A1="no",INDEX(D$10:D$20,MATCH(Z1&Z2&Z3,A$10:A$20&B$10:B$20&C$10:C$20)),""))}

I also made the rows of your arrays absolute assuming that you will be dragging this formula down a column.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,766
Messages
6,132,596
Members
449,738
Latest member
brianm3y3r

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