how to combine and's with or's in a if statement

how to combine and's with or's in a if statement

Post by Umlja » Sat, 24 Dec 2005 17:05:02


If "A" is constant for both or conditions, how does one write the if
statement? I tried to do this and got and error:
If(or($b4="UA", sum($r4+$t4>0, and($a4="S")),1,2)
--
Rick Rack
 
 
 

how to combine and's with or's in a if statement

Post by U3RlZm » Sat, 24 Dec 2005 19:41:04

Hi Rick,

You have a syntax error (missing closing parenthesis): sum($r4+$t4>0
correct: sum($r4+$t4)>0

But I can't tell wether your formula gives the result you want, because you
don't tell us what you want exactly!

Regards,
Stefi

ickezt rta:
>> If "A" is constant for both or conditions, how does one write the if >> statement? I tried to do this and got and error: >> If(or($b4="UA", sum($r4+$t>>0, and($a4="S")),1,2) >> -- >> Rick Rack

 
 
 

how to combine and's with or's in a if statement

Post by VG9wcGVyc » Sat, 24 Dec 2005 19:51:02

Rick,
Is this what you require?

=IF(AND(OR($B4="UA",$R4+$T4>0), ($A4="S")),1,2)

If B4="UA OR R4+T4>0 AND A4="S" then results is 1, otherwise 2
 
 
 

how to combine and's with or's in a if statement

Post by Bob Philli » Sat, 24 Dec 2005 21:04:36

maybe

=IF(OR($B4="UA",AND($R4+$T4>0,$A4="S")),1,2)

but where is A constant?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)