Multiple Index(match IFERRORs

Kmitchell

Active Member
Joined
Feb 27, 2007
Messages
363
Office Version
  1. 365
Platform
  1. Windows
Hello, I need some guidance on executing this formula. Essentially if there is no match on the 2020 Contracting increases schedule we then return a value on the trigger tab, if there is a match on the 2020 tab but there is no value it should search for the match on the 2019 contracting increases schedule, then if there is a match in 2019 but the match = 0 it will return the value in the trigger tab.

This formula below is my failed attempt. Suggestions?

IFERROR(IF(INDEX('2020 CONTRACTING INCREASES '!$G$4:$G$65,MATCH($A18,'2020 CONTRACTING INCREASES '!$A$4:$A$65,0))=0,'TRIGGER - INTERNAL ONLY'!$J$14,index('2019 CONTRACTING INCREASES'!$G$4:$G$65,match('SB_Inpatient-2020'!$A18,'2019 CONTRACTING INCREASES'!$A$4:$A$65,0))=0,'TRIGGER - INTERNAL ONLY'!$J$14)))
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hey,

This one is quite tricky without seeing the data but here's my go at the issue:

Code:
IFERROR(IF(INDEX('2020 CONTRACTING INCREASES '!$G$4:$G$65,MATCH('SB_Inpatient-2020'!$A18,'2020 CONTRACTING INCREASES '!$A$4:$A$65,FALSE),1)=0,'TRIGGER - INTERNAL ONLY'!J14,INDEX('2020 CONTRACTING INCREASES '!$G$4:$G$65,MATCH('SB_Inpatient-2020'!$A18,'2020 CONTRACTING INCREASES '!$A$4:$A$65,FALSE),1)),IF(INDEX('2019 CONTRACTING INCREASES'!G4:G65,MATCH('SB_Inpatient-2020'!$A18,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)=0,'TRIGGER - INTERNAL ONLY'!J14,INDEX('2019 CONTRACTING INCREASES'!$G$4:$G$65,MATCH('SB_Inpatient-2020'!$A18,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)))

Let me know if that works!
 
Last edited:
Upvote 0
Thank you so much for sending this along! It works but is not returning the expected result. I tried to move the formula around but was not successful. I think its how I explained it

Essentially it should look to the 2020 schedule first and if there is no match at all then it should go to the trigger, if there is a match and it =0 then it should go to the 2019 schedule. If there is a match in 2019 and it is also =0 then it should default to the trigger schedule.

The 2020 and 2019 schedules have the same list its just that 2020 may not have rates and 2019 might have them and we would want to capture that.

Does that help?
 
Upvote 0
Hey,

OK i'll take a look in to it - I think I can see the problem so let me re-work the formula and get back to you!
 
Upvote 0
Hey,

Try this (I hope this works!):

Code:
IFNA(IF(INDEX('2020 CONTRACTING INCREASES '!$G$4:$G$65,MATCH('SB_Inpatient-2020'!$A18,'2020 CONTRACTING INCREASES '!$A$4:$A$65,FALSE),1)=0,IF(INDEX('2019 CONTRACTING INCREASES'!$G$4:$G$65,MATCH('SB_Inpatient-2020'!$A18,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)=0,'TRIGGER - INTERNAL ONLY'!$J$14,INDEX('2019 CONTRACTING INCREASES'!$G$4:$G$65,MATCH('SB_Inpatient-2020'!$A18,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)),INDEX('2020 CONTRACTING INCREASES '!$G$4:$G$65,MATCH('SB_Inpatient-2020'!$A18,'2020 CONTRACTING INCREASES '!$A$4:$A$65,FALSE),1)),'TRIGGER - INTERNAL ONLY'!$J$14)
 
Upvote 0
Hi ! I caught something with my file and need to add in another stipulation, however I tried to follow the formula provided and it is not giving an expected result.

Here is what I attempted to do, it is returning 0% in this example and it should have found 2.5%.

Essentially we want it to look at 2020 file column H first, and if its blank go to 2019 and look at column AA and if blank go to 2019 and look at column G, if they are all blank then go to the trigger tab, if it is not found at all then go to the trigger. What am I doing wrong here? The only time it should be 0% is when it is hard coded into the 2019 or 2020 templates.

=IFNA(IF(INDEX('2020 CONTRACTING INCREASES '!$H$4:$H$65,MATCH($A49,'2020 CONTRACTING INCREASES '!$A$4:$A$65,FALSE),1)="",IF(INDEX('2019 CONTRACTING INCREASES'!$AA$4:$AA$65,MATCH($A49,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)="",IF(INDEX('2019 CONTRACTING INCREASES'!$G$4:$G$65,MATCH($A49,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)="",'TRIGGER - INTERNAL ONLY'!$I$14,INDEX('2020 CONTRACTING INCREASES '!$H$4:$H$65,MATCH($A49,'2020 CONTRACTING INCREASES '!$A$4:$A$65,FALSE),1)),INDEX('2019 CONTRACTING INCREASES'!$AA$4:$AA$65,MATCH($A49,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)),INDEX('2019 CONTRACTING INCREASES'!$G$4:$G$65,MATCH($A49,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)),'TRIGGER - INTERNAL ONLY'!$I$14)
 
Upvote 0
Hey,

So after having a look through at this formula, which in itself is quite complicated to read! I think I have come up with something to meet your situation:

Code:
IFNA(IF(INDEX('2020 CONTRACTING INCREASES '!$H$4:$H$65,MATCH($A49,'2020 CONTRACTING INCREASES '!$A$4:$A$65,FALSE),1)="",IFNA(IF(INDEX('2019 CONTRACTING INCREASES'!$AA$4:$AA$65,MATCH($A49,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)="",IFNA(IF(INDEX('2019 CONTRACTING INCREASES'!$G$4:$G$65,MATCH($A49,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)="",'TRIGGER - INTERNAL ONLY'!I14,INDEX('2019 CONTRACTING INCREASES'!$G$4:$G$65,MATCH($A49,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)),'TRIGGER - INTERNAL ONLY'!$I$14),INDEX('2019 CONTRACTING INCREASES'!$AA$4:$AA$65,MATCH($A49,'2019 CONTRACTING INCREASES'!$A$4:$A$65,FALSE),1)),'TRIGGER - INTERNAL ONLY'!$I$14),INDEX('2020 CONTRACTING INCREASES '!$H$4:$H$65,MATCH($A49,'2020 CONTRACTING INCREASES '!$A$4:$A$65,FALSE),1)),'TRIGGER - INTERNAL ONLY'!$I$14)

I used helper cells for each index match then pasted it carefully in to that master formula - let me know if it works. Cheers!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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