IF with INDEX MATCH

rmn123

New Member
Joined
Jan 11, 2018
Messages
1
Hi!

I am trying to create an IF formula with two INDEX MATCH formals within it. ie. if a cell says one thing use INDEX MATCH A otherwise use INDEX MATCH B.

This is the formula I have written and it is still not pulling correctly.

=IF(BH7="#N/A",(INDEX('[File A]Sheet1'!$G:$G,MATCH(D7,'[File A]Sheet1'!$F:$F,0))),(INDEX('[File B]Sheet1!$A:$A,MATCH(D7,'[File B]Sheet1!$G:$G,0))))

Any advice would be greatly appreciated.

Thanks!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
rmn123, Good afternoon.

Try to use:

=IF(ISERROR(BH7),(INDEX('[File A]Sheet1'!$G:$G,MATCH(D7,'[File A]Sheet1'!$F:$F,0))),(INDEX('[File B]Sheet1!$A:$A,MATCH(D7,'[File B]Sheet1!$G:$G,0))))

Please, tell us if it is what you want?
I hope it helps.
 
Upvote 0
Are you typing the #N/A into cell BH7? Or is there a formula in that cell that could have that output? If it is a formula even though #N/A is displayed I don't think it is actually text you can test for.
 
Upvote 0
It is difficult to help you with out more details, but the way I approach these sort of problems is to copy the equation into notebook (or any text editor) and then copy the equation back to three or four spare cells, the reason for doing this is if yoiu copy with excel, excel will automatically change all the realtive addresses, copying via note book means you get cells which are identical.
I then get rid of different bits of the equation and check the each bit is getting the correct answer. eg. test the index, match bits separately and test the kif statement on its own
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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