View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Teethless mama Teethless mama is offline
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?