IF(AND(OR

  • Thread starter Thread starter JIM
  • Start date Start date
J

JIM

HOW DO I FIX THIS FORMULA SO I DO NOT GET A FALSE ANSWER.
=IF(AND(D4=25),IF(OR(E4=100,F4=75),1,0))

D E F G
20 100 75 FALSE
 
Hi Jim
what do you want to achieve?. currently you are looking if D4=25 and if
yes, if either E4=100 or F4=75. As in you example D4=20 the formula
return FALSE. To achieve TRUE the part D4=25 has to be change to D4=20
(but I'm not sure if this is your desired result).
Also you can skip the first AND function:
=IF(D4=25,IF(OR(E4=100,F4=75),1,0))
is sufficient

HTH
Frank
P.S: please disable your CAPS lock. Uppercase text is quite difficult
to read
 
JIM, It would be helpful to know what the function is supposed to do.

If you're meaning to say "If D4=25 AND either E4=100 OR F4=75, the
show me a 1, otherwise show me a 0", then use the below

=IF(AND(D4=25,OR(E4=100,F4=75)),1,0
 
JIM said:
HOW DO I FIX THIS FORMULA SO I DO NOT GET A FALSE ANSWER.
=IF(AND(D4=25),IF(OR(E4=100,F4=75),1,0))

D E F G
20 100 75 FALSE
Try
=TRUE

...seriously, please explain the desired logic and I or someone else will create a working
formula.
 
IF D4=25 AND (E4=100 OR F4=75) THEN 1,0
IF D4 IS NOT 25 (FALSE) I WANT THE RESULT TO BE "0"
NOT "FALSE"
 
Thanks this was it. >=IF(AND(D4=25,OR(E4=100,F4=75)),1,0)
Didn't know you could use OR without another If
Thanks
JIM
 
Back
Top