IF-INDEX-MATCH: Multiple IF functions with multiple matches returning various results

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
929
Office Version
  1. 365
Platform
  1. Windows
URGENT: I am having a problem with the below formula and seem to be having an off day and can't figure this out. The formula will match the first criteria but not the second and 3rd IF functions. It will just return "False" for the other 2. Any idea what I am missing?

=IF(C14="SPM",(INDEX(Sheet2!C:C,MATCH(D23,Sheet2!A:A,FALSE),IF(C14="Metco",(INDEX(Sheet2!E:E,MATCH(D23,Sheet2!A:A,FALSE)),IF(C14="Honeywell",(INDEX(Sheet2!G:G,MATCH(D23,Sheet2!A:A,FALSE)))))))))

If I type in SPM in C14 it will return the value in C:C that corresponds with A:A however I get a "FALSE" for the remaining 2.

Thank you for your help

Carla
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
You've got brackets in the wrong places, try
=IF(C14="SPM",INDEX(Sheet2!C:C,MATCH(D23,Sheet2!A:A,FALSE)),IF(C14="Metco",INDEX(Sheet2!E:E,MATCH(D23,Sheet2!A:A,FALSE)),IF(C14="Honeywell",(INDEX(Sheet2!G:G,MATCH(D23,Sheet2!A:A,FALSE))))))
 
Upvote 0
Excel changed the formula to: =IF(C14="SPM",INDEX(Sheet2!C:C,MATCH(D23,Sheet2!A:A,FALSE)),IF(C14="Metco",INDEX(Sheet2!E:E,MATCH(D23,Sheet2!A:A,FALSE)),IF(C14="Honeywell",(INDEX(Sheet2!G:G,MATCH(D23,Sheet2!A:A,FALSE))))))

However it is still not returning the correct values.
For example for the first set it is returning C3 from Sheet 2 which is correct as A3 on Sheet 2 matches D23 on Sheet1. However for the 2nd IF function it returns E4 when A3 and D23 match and for the 3rd IF function it returns "0" (G5-11 are blank in Sheet 2)
Basically the index is not staying lined up on the same row with the first match C-A, E-A, G-A and so forth.

I am not sure if I am explaining this properly.

Thank you

Carla
 
Upvote 0
That formula works fine for me, so without being able to see your data, I've no idea why its returning the wrong value.
 
Upvote 0
IF C14=SPM,Metco or Honeywell AND IF D23= 444 or any of the below Values in Column A

EXAMPLE

Sheet 1

C14: Metro
D23: 601

FORMULA:[Formula should return Bond: n/a for SPM, 1000psi for Metco and 2350psi for Honeywell] = 1000psi

Sheet 2

Column A Column B Column C Column D Column E Column F Column G

[TABLE="width: 592"]
<colgroup><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD][TABLE="width: 592"]
<colgroup><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Powder [/TD]
[TD] SPM[/TD]
[TD] [/TD]
[TD] Metco[/TD]
[TD] [/TD]
[TD] Honeywell[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Hardness [/TD]
[TD]Bond [/TD]
[TD] Hardness [/TD]
[TD]Bond[/TD]
[TD]Hardness [/TD]
[TD]Bond[/TD]
[/TR]
[TR]
[TD]444[/TD]
[TD] -[/TD]
[TD]2500psi[/TD]
[TD] -[/TD]
[TD]>4000psi[/TD]
[TD] -[/TD]
[TD]4250 psi[/TD]
[/TR]
[TR]
[TD]601 [/TD]
[TD] -[/TD]
[TD]n/a[/TD]
[TD] -[/TD]
[TD]1000psi[/TD]
[TD] -[/TD]
[TD]2350 psi[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]

[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Nevermind. I found my error.

Thank you very much for your help!
 
Upvote 0
That's exactly what I get. Do you have any merged cells?
 
Upvote 0
I do have merged cells but it is working now so all is good. One more question, where would I add an IFERROR return blank in this formula?
basically starting the formula with IFERROR( and ending with ," ").

Thank you

Carla
 
Upvote 0
Like
=IFERROR(IF(C14="SPM",INDEX(Sheet2!C:C,MATCH(D23,Sheet2!A:A,FALSE)),IF(C14="Metco",INDEX(Sheet2!E:E,MATCH(D23,Sheet2!A:A,FALSE)),IF(C14="Honeywell",INDEX(Sheet2!G:G,MATCH(D23,Sheet2!A:A,FALSE))))),"")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
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