embedded if statements

Elise Nerlove

Board Regular
Joined
Dec 17, 2009
Messages
94
hi! question...

i have 3 categories: olives, ps, peppers.

I want my if statement to do this:

if cell A1=olives and if cell A1 is less than 6.00 then "OK" if not then "FALSE" and if call A1=ps and if cell A1 is greater than 7 then "ok" if not then "false" and if cell A1=peppers and if cell a1 is greater than 3 then "ok" if not then "false"

This is how i started my function, but its wrong and im stuck!!! help! thank you!
=IF(A1="PEPPERS",IF(A1<3.00,"OK","FALSE")=IF(A1="OLIVE",IF(A1<6.00,"OK","FALSE")))
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi Elise,

Just a question. How can A1 have two different values or are you wanting and OR.

A1 can be Olives OR <6?

Did I read this right?
 
Upvote 0
hi, i actually figured out an equation.

=IF(H7="","",IF(H7="PEPPERS",IF(G7<3,"OK","FALSE"),IF(H7="OLIVE",IF(G7<7.01,"OK","FALSE"),IF(H7="PS",IF(G7<7.01,"OK","FALSE")))))

i dont really use AND statements, but if you think this equation could be simplified at all, id appreciate any insight! thanks for reading my post!
 
Upvote 0
I think you can change to...

=IF(H7="","",IF(AND(H7="PEPPERS",G7<3),"OK",IF(AND(OR(H7={"OLIVE","PS"}),G7<7.01),"OK",FALSE)))

...but even with this you will always get OK as long as H7 has one of the three choices and doesn't matter what is in G7 because blank is always less than.

Do you have any further info to add?
 
Upvote 0
thats ok...i think (?). All items are always categorized as either PS, PEPPERS, OLIVES...and i just need the if statement to make sure that pricing is under a certain number (that number differs by category).
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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