Multiple arguments in one formula

jodilee3

New Member
Joined
Dec 18, 2017
Messages
1
Hi Everyone,

I have spent way to much time trying to connect everything into one formula, to the point where i am not sure if it can be done. Hopefully my explanation below is not too confusing. I need to make the following work:

If cell C2 contains Apple,Orange or pear and cell D2 is less than 0.2 then pass or more than 0.2 fail. If cell C2 contains grapes, banana, mango and d2 is less than 1.2 pass or more than 1.2 fail.

I need this all in one formula to make this work, can anyone help?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Welcome to the board.

Why does it have to be all in one formula ?
It's OK to use more than one cell to solve a problem, that's the whole point of Excel giving you over 16000 columns and 2Million rows worth of cells. Use some of them.

Anyway, for that specific scenario, try

=IF(OR(C2={"Apple","Orange","Pair"}),IF(D2<0.2,"Pass","Fail"),IF(OR(C2={"Grapes","Banana","Mango"}),IF(D2<1.2,"Pass","Fail"))
 
Upvote 0
An easier way would be to setup a lookup table for the number value of each fruit...
Say F2:G7

F2:F7 = Apple Orange Pair Grapes Banana Mango
G2:G7 = 0.2 0.2 0.2 1.2 1.2 1.2

Then you do
=IF(D2<VLOOKUP(C2,$F$2:$G$7,2,0),"Pass","Fail")
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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