if statement

M

Max_power

Hello

I was wondering if it's possible to do an if-statement were you have
more than one condition in the criteria ie something like


=if(a1<>0,a<1,"yes","no")
So if a1 is less than 0 and less than 1 print yes otherwise no

Is that syntax correct?

Many thanks
 
R

RagDyeR

You can use the AND function.

=If (And(A1<>0,A1<1),"Yes","No")

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

in message
Hello

I was wondering if it's possible to do an if-statement were you have
more than one condition in the criteria ie something like


=if(a1<>0,a<1,"yes","no")
So if a1 is less than 0 and less than 1 print yes otherwise no

Is that syntax correct?

Many thanks
 
M

Max_power

I apologise for being a bit of a nuisance but is it possible to have
multiple conditions in the criteria ie

=IF(AND(A1<>\"TOM\",A1<>0,A>0),1,0)

So I'm trying to say that if cell a1 is not equal to Tom,0 and is
greater than 0 then 1 applies otherwise 0

Many thanks once again

Max
 
T

Thansal

Yes, the AND() Function can take up to 30 different conditions (if I
remember correctly), It will return TRUE only if all of the conditions
evaluate to TRUE, otherwise it returns FALSE.
 
S

Sloth

The following funtion does the same thing as using the AND function, but it
has no limit. I doubt you will ever need more than 30, but the capability is
there. :)

=if((a1<>0)*(a<1),"yes","no")


The following function does the same thing as using the OR function. Excel
considers any non zero number as TRUE, and 0 as FALSE.

=if((a1<>0)+(a<1),"yes","no")
 
Top