ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   if statement (https://www.excelbanter.com/excel-discussion-misc-queries/97764-if-statement.html)

Max_power

if statement
 

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


--
Max_power
------------------------------------------------------------------------
Max_power's Profile: http://www.excelforum.com/member.php...o&userid=32255
View this thread: http://www.excelforum.com/showthread...hreadid=558834


RagDyeR

if statement
 
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!
================================================== ===

"Max_power" wrote
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


--
Max_power
------------------------------------------------------------------------
Max_power's Profile:
http://www.excelforum.com/member.php...o&userid=32255
View this thread: http://www.excelforum.com/showthread...hreadid=558834



Max_power

if statement
 

Many thanks


--
Max_power
------------------------------------------------------------------------
Max_power's Profile: http://www.excelforum.com/member.php...o&userid=32255
View this thread: http://www.excelforum.com/showthread...hreadid=558834


Max_power

if statement
 

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,A0),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


--
Max_power
------------------------------------------------------------------------
Max_power's Profile: http://www.excelforum.com/member.php...o&userid=32255
View this thread: http://www.excelforum.com/showthread...hreadid=558834


Thansal

if statement
 
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.

Max_power wrote:
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,A0),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


--
Max_power
------------------------------------------------------------------------
Max_power's Profile: http://www.excelforum.com/member.php...o&userid=32255
View this thread: http://www.excelforum.com/showthread...hreadid=558834



Sloth

if statement
 
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")


"Max_power" wrote:


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


--
Max_power
------------------------------------------------------------------------
Max_power's Profile: http://www.excelforum.com/member.php...o&userid=32255
View this thread: http://www.excelforum.com/showthread...hreadid=558834




All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com