IF and INDEX & MATCH formula help

k3v1n23

New Member
Joined
May 13, 2013
Messages
7
Hi Guys,

Need a bit of help with this formula please:

=IF(AND(A3="Product 1",B3<=49),B3*F3*(INDEX('Stock Prices'!$B$2:$B$65,MATCH('Company Inventory'!D3,'Stock Prices'!$A$2:$A$65,0),IF(AND(A3="Product 1",B3>=50),B3*F3*(INDEX('Stock Prices'!$C$2:$C$65,MATCH('Company Inventory'!D3,'Stock Prices'!$A$2:$A$65,0)))))))

It gives me an answer no problem when the first IF criteria is met i.e. if A3 equals Product 1 and B3 is less than 49. However, when it comes to criteria two i.e. if A3 equals Product 1 and B3 is greater than or equal to 50 then it says FALSE. Can't understand where I've gone wrong.

Any help would be much appreciated!


Thanks,

Kev
 
Does this re-write...

=IF(A3="Product 1",B3*F3*INDEX('Stock Prices'!$B$2:$C$65,MATCH('Company Inventory'!D3,'Stock Prices'!$A$2:$A$65,0),IF(B3<=49,1,2)),"")

work for you?
 
Upvote 0
Hi,

Thanks for your reply. I stayed up very late and somehow figured it out.

=IF(AND(A7="Vinyl",B7<=49),B7*F7*(INDEX('Stock Prices'!$B$2:$B$65,MATCH('Black Lotus Inventory'!D7,'Stock Prices'!$A$2:$A$65,0))),IF(AND(A7="Vinyl",B7>=50),B7*F7*(INDEX('Stock Prices'!$C$2:$C$65,MATCH('Black Lotus Inventory'!D7,'Stock Prices'!$A$2:$A$65,0)))))

I added two extra parenthesis at the end of the initial MATCH function. It worked, but not sure how?
 
Upvote 0
Hi,

Thanks for your reply. I stayed up very late and somehow figured it out.

=IF(AND(A7="Vinyl",B7<=49),B7*F7*(INDEX('Stock Prices'!$B$2:$B$65,MATCH('Black Lotus Inventory'!D7,'Stock Prices'!$A$2:$A$65,0))),IF(AND(A7="Vinyl",B7>=50),B7*F7*(INDEX('Stock Prices'!$C$2:$C$65,MATCH('Black Lotus Inventory'!D7,'Stock Prices'!$A$2:$A$65,0)))))

I added two extra parenthesis at the end of the initial MATCH function. It worked, but not sure how?

Did you also consider the shorter version?
 
Upvote 0

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