Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jon Jon is offline
external usenet poster
 
Posts: 183
Default [newbie] if statement

I'm trying to include a conditional however, I'm getting a sort of a syntax
error:

=if((F5H5) AND (UPPER(C7) = "YES") AND (C9/C10 H9), "Yes", "No")

F5 0.80
H5 0.75
C7 Yes
C9 50000
C10 45000 C9/C10 = 1.11.
H9 0.90

Any ideas?





  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default [newbie] if statement

"Jon" wrote:
I'm trying to include a conditional however, I'm getting
a sort of a syntax error:
=if((F5H5) AND (UPPER(C7) = "YES") AND (C9/C10 H9), "Yes", "No")


=if(and(F5H4, UPPER(C7)="YES", C9/C10 H9), "Yes", "No")

If C10 can be zero, you will want to do this differently, perhaps:

=if(C10=0, "No", if(and(F5H4, UPPER(C7)="YES", C9/C10 H9), "Yes", "No"))

or

=if(C10=0, if(and(F5H4, UPPER(C7)="YES"), "Yes", "No"),
if(and(F5H4, UPPER(C7)="YES", C9/C10 H9), "Yes", "No"))


----- original message -----

"Jon" wrote in message
...
I'm trying to include a conditional however, I'm getting a sort of a
syntax
error:

=if((F5H5) AND (UPPER(C7) = "YES") AND (C9/C10 H9), "Yes", "No")

F5 0.80
H5 0.75
C7 Yes
C9 50000
C10 45000 C9/C10 = 1.11.
H9 0.90

Any ideas?







  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,388
Default [newbie] if statement

Hi,
The syntax for AND is:
AND(Condition1, Condition 2, Condition n)
Try this syntax:
=IF(AND(F5H5, UPPER(C7)="YES", C9/C10H9),"Yes","No")

Note that if C10 is blank, you'll get a #DIV/0! (divide by zero) error.

Regards - Dave.

"Jon" wrote:

I'm trying to include a conditional however, I'm getting a sort of a syntax
error:

=if((F5H5) AND (UPPER(C7) = "YES") AND (C9/C10 H9), "Yes", "No")

F5 0.80
H5 0.75
C7 Yes
C9 50000
C10 45000 C9/C10 = 1.11.
H9 0.90

Any ideas?





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default [newbie] if statement

=if(and(F5H4, UPPER(C7)="YES", C9/C10 H9), "Yes", "No")

Remove the "UPPER" part. It's not a case senstive
C7="Yes", or C7="YES", or C7="yEs"


"Joe User" wrote:

"Jon" wrote:
I'm trying to include a conditional however, I'm getting
a sort of a syntax error:
=if((F5H5) AND (UPPER(C7) = "YES") AND (C9/C10 H9), "Yes", "No")


=if(and(F5H4, UPPER(C7)="YES", C9/C10 H9), "Yes", "No")

If C10 can be zero, you will want to do this differently, perhaps:

=if(C10=0, "No", if(and(F5H4, UPPER(C7)="YES", C9/C10 H9), "Yes", "No"))

or

=if(C10=0, if(and(F5H4, UPPER(C7)="YES"), "Yes", "No"),
if(and(F5H4, UPPER(C7)="YES", C9/C10 H9), "Yes", "No"))


----- original message -----

"Jon" wrote in message
...
I'm trying to include a conditional however, I'm getting a sort of a
syntax
error:

=if((F5H5) AND (UPPER(C7) = "YES") AND (C9/C10 H9), "Yes", "No")

F5 0.80
H5 0.75
C7 Yes
C9 50000
C10 45000 C9/C10 = 1.11.
H9 0.90

Any ideas?








  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default [newbie] if statement

I'm trying to include a conditional however, I'm getting a sort of a
syntax error:

=if((F5H5) AND (UPPER(C7) = "YES") AND (C9/C10 H9), "Yes", "No")


The way to do logical AND in Excel is
AND(condition1, condition2, condition3)

So maybe this will meet the need:
=IF(AND(F5H5, UPPER(C7)="YES", C9/C10H9), "Yes", "No")

Or with an error check:
=IF(C10=0, "undefined", IF(...as above...))
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
[newbie] Jon Excel Discussion (Misc queries) 3 March 29th 09 10:10 AM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
Help for a newbie... please Nancie Excel Worksheet Functions 2 April 21st 06 01:48 AM
Help! Newbie tenaj Excel Discussion (Misc queries) 7 March 22nd 06 09:18 PM
Newbie Help. Is this possible? taltos1 Excel Discussion (Misc queries) 5 November 12th 05 04:40 PM


All times are GMT +1. The time now is 02:24 AM.

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

About Us

"It's about Microsoft Excel"