Combining IF/ INDEX/ MATCH with multiple criteria over multiple sheets

Ferlucia

New Member
Joined
Jul 3, 2014
Messages
43
Hello everyone,

I know this is a question that's been asked a lot (I know cause I read them all).
But for some reason it doesn't work for me, so I wonder what I'm doing wrong.

What this formula should do:
It has to search the right price of an article based om 2 criteria: the name (column A) and the quality (column B)
IF the amount is lower than 50, it needs to take the price out of column C, and IF it is above 50 then it has to take the price out of column D.

The sheet with all the prices per article is sheet 2 (Blad2)
The sheet where I type the name (F31), the quality (J31) and the amount (L31) is sheet 1 (Hout-idee NL).

This is the formula I have:
=IF(L31<=50;INDEX(Blad2!$C$5:$C$14;MATCH(F31&J31;Blad2!$A$5:$A$14&Blad2!$B$5:$B$14;0));INDEX(Blad2!$D$5:$D$14;MATCH(F31&J31;Blad2!$A$5:$A$14&Blad2!B$5:B$14;0)))

But I constantly get errors, no matter how i adjust it...

The answer is probebly simple and obvious, but I don't see it.

Hope you can help me :)
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Maybe you need to lock your criteria on cell J31

IF(L31<=50

when you copied your formula down or cross, your condition will go away
 
Upvote 0
I'm afraid I don't understand.

I haven't copied this formula jet
This is the original witch I'm trying to get to work first, before I copy it...

Or did you mean something else?
 
Upvote 0
Try this (you may need to extend the amount of rows):

=IF($L$31<50,SUMPRODUCT(--(Blad2!$A$2:$A$51=$F$31),--(Blad2!$B$2:$B$51=$J$31),Blad2!$C$2:$C$51),SUMPRODUCT(--(Blad2!$A$2:$A$51=$F$31),--(Blad2!$B$2:$B$51=$J$31),Blad2!$D$2:$D$51))
 
Upvote 0
I tried and I still get an error.
When I pressed evaluate, I got many rows of numbers and true, not true values.
 
Upvote 0
Many rows?? You should have only one formula as you are only looking for one price
 
Upvote 0
Hout-idee NL

F31 houses an article name.
J31 houses a quality qualifying value.
L31 houses an amount.

Control+shift+enter, not just enter:
Rich (BB code):
=INDEX(Blad2!$C$5:$D$14;
  MATCH($F31;IF(Blad2!$B$5:$B$14=$J31;Blad2!$B$5:$B$14);0);
  IF($L31>50;2;1))
 
Upvote 0
For some reason, It suddenly works!
(Maybe I pressed a wrong button somewhere the first time?)

Thank you so much :)
 
Upvote 0
That might be true,
So I tried your formula as well, but it gave an error :s

When I pressed evaluate it underlined this part:

=INDEX(Blad2!$C$5:$D$14; MATCH($F31;IF(Blad2!$B$5:$B$14=$J31;Blad2!$B$5:$B$14);0); IF($L31>50;2;1))</pre>
 
Upvote 0

Forum statistics

Threads
1,213,483
Messages
6,113,919
Members
448,533
Latest member
thietbibeboiwasaco

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