Syntax

G

gary

What is the correct syntax of the Excel formula for this
expression:

If A1="DOG"
or
if B1="CAT"
or
if C1="POSSUM"
or
if D1="FERRET"
then "YES"
else "NO".
 
P

Peo Sjoblom

=IF(OR(A1="Cat",B1="Dog",C1="Possum",D1="Ferret"),"Yes","No")

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 
G

GARY

Peo,

Thanks !

(I was trying to use #OR# instead but I couldn't get the
syntax right).

Gary
 
H

Harlan Grove

GARY said:
(I was trying to use #OR# instead but I couldn't get the
syntax right).
....

That's the 123/Quattro Pro *operator*. Excel uses functions. So AND(..)
rather than #AND# and NOT(..) rather than #NOT#.
 
Top