#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 136
Default IF Statement

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GBC GBC is offline
external usenet poster
 
Posts: 4
Default CountA

I am trying to create/use a formula to count the date range between a
specific period in one column and whether another column contains the
specific test i.e...ICO or WFO I am getting a count back of 1 but it should
be 3 and I have double checked for unkown character spaces in the cells.
=COUNTA((E3:E58="2/1/2009")*AND(H3:H58="ICO"))

Can someone please help me with this problem????

"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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default CountA

=sumproduct(--(e3:e58=(date(2008,2,1)),--(h3:h58="ico"))

(I couldn't tell if your date was Feb 2, 2009 or Jan 2, 2009--I used Feb 1, 2009
in that formula.)

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

If you're using xl2007, there's a =countifs() function that you may want to look
at.

GBC wrote:

I am trying to create/use a formula to count the date range between a
specific period in one column and whether another column contains the
specific test i.e...ICO or WFO I am getting a count back of 1 but it should
be 3 and I have double checked for unkown character spaces in the cells.
=COUNTA((E3:E58="2/1/2009")*AND(H3:H58="ICO"))

Can someone please help me with this problem????

"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
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default IF Statement

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
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default IF Statement

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

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 136
Default IF Statement

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........
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default IF Statement

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
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default IF Statement

Hi Ardy,
Try

=IF(ISNUMBER(FIND("ND",AH2))=TRUE,"N",IF(AH2AQ2," Y","N"))

It works for me

"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

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 136
Default IF Statement

On Feb 24, 11:58*am, Eduardo
wrote:
Hi Ardy,
Try

=IF(ISNUMBER(FIND("ND",AH2))=TRUE,"N",IF(AH2AQ2," Y","N"))

It works for me



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


- Show quoted text -


Thanks Eduardo:
Works like Charm, I guess the part I was missing was ISNUMBER(FIND
("ND",AH2))=TRUE,"N", which looks into the value and if ND is True
Places a N and the rest is history.......

I do Apriciate from all helping me on this....

Ardy


  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default IF Statement

Your welcome
If this was helpful please say yes at the bottom of the screen. thank you

"ardy" wrote:

On Feb 24, 11:58 am, Eduardo
wrote:
Hi Ardy,
Try

=IF(ISNUMBER(FIND("ND",AH2))=TRUE,"N",IF(AH2AQ2," Y","N"))

It works for me



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


- Show quoted text -


Thanks Eduardo:
Works like Charm, I guess the part I was missing was ISNUMBER(FIND
("ND",AH2))=TRUE,"N", which looks into the value and if ND is True
Places a N and the rest is history.......

I do Apriciate from all helping me on this....

Ardy

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
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
Sum if statement with a left statement Eric D Excel Discussion (Misc queries) 4 July 23rd 08 05:31 PM
SUMIF statement with AND statement Eric D Excel Discussion (Misc queries) 2 July 14th 08 07:24 PM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM


All times are GMT +1. The time now is 11:59 PM.

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"