Thread: IF Statement
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardy Ardy is offline
external usenet poster
 
Posts: 136
Default IF Statement

On Feb 24, 9:09*am, Dave Peterson wrote:
I think you'll want to share what you have in AH2 and AQ2.

And it looks like you're assigning N to all the "else" portions of your
formula. *Is that on purpose or an error in the real formula or an error in the
post?

=IF(AH2AQ2,"Y","N")
looks equivalent to the formula you posted

Ardy wrote:

Hello All:
I have this formula =IF(AH2AQ2,"Y",IF(AH2<AQ2,"N",IF
(AH2="ND","N","N")))
it works pritty good with the exception of the ND part. *when I test
it I expect to get a N when entering ND in AH2 but get Y. *Can any
body show me where I went wrong.


Ardy


--

Dave Peterson


Hello Dave:
Thanks for clarifying the Post problem. I wish I knew how to remove
the CountA, but hay as long as I got you.........

OK My logic is a if statement that evalutes 4 conditions
1- if AH2 is Grather than AQ2 place a Y
2- if AH2 is Less Than AQ2 place a N
3- if AH2 is equal to ND plave an N
4- else place a N

I see your point if 1 is true then 2 and 4 are the same which is else,
and 3 is another if so this should work right =IF(AH2AQ2,"Y",IF
(AH2="ND","N")). The problem is that if AH2=AQ2 then it also should
be N the above rework returns a Y and also returnes Y for ND

Ardy