#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 252
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL concatenation statement CLamar Excel Discussion (Misc queries) 0 June 29th 06 01:58 PM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM


All times are GMT +1. The time now is 10:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"