0
votes

I have just built an Excel formula. In the below image, I am trying to build conditional formulas in columns AA through AI that will select cells from B through I only if specific conditions are met, the conditions being that the cells in columns B through I fall in either the "1 to 3" or "4 to 7" buckets AND are less than or equal to 0.68 in column P. Check out this screenshot:

screenshot

Using column AH which I have colored in red, you can see the formula I built:

**=IF(OR(AND(I4="1 to 3 Bucket",I4="4 to 7 Bucket"), AND(P4<=0.68)),"Select","Don't Select")**

I don't think the formula I built is entirely correct. For example look at row 8. Only one condition is met yet (the Food Score) yet it is selecting every column.

I want it to select cells from columns B through H only if All the conditions are met.

1

1 Answers

0
votes

I think you're mixing up AND() and OR(). From your description, "either this bucket or that bucket" belongs inside an OR() statement. Then if you want to tack on " and at the same time P4 <= x" then you need an AND for that, but wrapped around the OR, not the other way.

So, try

=IF(and(OR(I4="1 to 3 Bucket",I4="4 to 7 Bucket"),P4<=0.68),"Select","Don't Select")