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

On Feb 24, 11:53*am, Kevin wrote:
On Feb 24, 11:47*pm, Dave Peterson wrote:





What do you have in AH2?
What do you have in AQ2?


ardy wrote:


On Feb 24, 10:09 am, Shane Devenshire
wrote:
Hi,


Back to the original


=IF(AH2AQ2,"Y","N")


There is no need to rework anything. *It works just like it is above unless
you are not telling us something. *Note you have one condtion that returns Y
and all the others return N so there is no need to test each of the other
conditions. *You only need additional tests if you have other answers you
want to return, but you have not showed us any.


--
If this helps, please click the Yes button


Cheers,
Shane Devenshire


"ardy" wrote:
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- Hide quoted text -


- Show quoted text -


It returns a Y if ND is entered in Cell AH2 *it should return a N
which is All other conditions. *Maybe becuse ND is Text not
number........


--


Dave Peterson- Hide quoted text -


- Show quoted text -


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 am bit confused on the third and fourth point, since the output of
both is "N". Do you think you need the third criteria in your
formula..?- Hide quoted text -

- Show quoted text -


Sorry All for not explaining enough........
AH2 contains Numbers and letters either or. either a number or
letters ND for none detect (results Water Quality-WQ)
AQ2 contains numbers or Null (Detection Limit for Reporting DLR)
The formula (if statement) goes into AL2 and places a Y for Yes N for
No and ND for none detect.
The provbided solution of =IF(AH2AQ2,"Y","N") works for all
situations with the exeption of ND should return a N It returns a Y
and if AH2=AQ2 it should return a N it returns Y

Ardy