Help adjusting an 'AND' Formula

STEVENS3010

Board Regular
Joined
Feb 4, 2020
Messages
89
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hey all,

Is anybody please able to help me adjust the below formula to achieve the result I'm looking for please?

In summary, I'm trying to return a true/false value in a particular cell that is dependent on the value in two other cells.

For example, in cell 'N4' I would like a 'true' value to return if the number in cell 'C6' is between 50 and 88, and the value in 'F2' is either 'Red' or 'Blue'.

However, where it gets complicated is that I have a second criteria where I would also like a 'true' value to return in the same cell, based on the number in cell 'C6' being between 21-49 and the value in cell F2 being 'green'.

Is it possible to adapt the current formula to achieve this?

Current formula
Excel Formula:
=AND($C$6>=50,$C$6<=88,OR($F$2="Red",$F$2="Blue"))
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
try this:
Excel Formula:
=OR(AND($C$6<88,$C$6>50,OR($F$2="Red",$F$2="Blue")),AND($C$6<49,$C$6>21,$F$2="green"))
 
Upvote 0
based on the number in cell 'C6' being between 21-49 and the value in cell F2 being 'green'.
As
=AND($C$6>=50,$C$6<=88,OR($F$2="Red",$F$2="Blue"))
Works, then you just need to add an OR for the new combination

= AND ( $C$6>=21,$C$6<=49, $F$2="Green")
= AND($C$6>=50,$C$6<=88,OR($F$2="Red",$F$2="Blue"))

then an
OR ( AND ( $C$6>=21,$C$6<=49, $F$2="Green"), AND($C$6>=50,$C$6<=88,OR($F$2="Red",$F$2="Blue")) )
 
Upvote 0
Thanks both, I've just ran the formula suggested by both of you but unfortunately only the original part of the formula appears to work, the additional part I'm looking to add still returns a false value when cells 'C6' and 'F2' meet the criteria. (i.e. cell C6 has a number between 21-49 and F2 is 'green'. Any ideas?
 
Upvote 0
Apologies, this was my mistake. I had incorrectly changed a cell reference. The above works - thank you both.
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,936
Members
449,094
Latest member
teemeren

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