A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"AND FUNCTION" RETURNS FALSE WHEN CRITERIA IS TRUELY MET. HELP!!!



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2010, 08:47 PM posted to microsoft.public.excel.worksheet.functions
gamn
external usenet poster
 
Posts: 8
Default "AND FUNCTION" RETURNS FALSE WHEN CRITERIA IS TRUELY MET. HELP!!!

I have a problem using AND function on date data.

In cell A2, I have date date "10/1/2009".

In cell A3, I have AND fuction as =AND(A2=10/1/2009, A2=10/24/2009). This
should return a TRUE but instead returns FALSE. Why?


Thank you, BB
  #2  
Old March 23rd, 2010, 08:57 PM posted to microsoft.public.excel.worksheet.functions
Paul C
external usenet poster
 
Posts: 202
Default "AND FUNCTION" RETURNS FALSE WHEN CRITERIA IS TRUELY MET. HELP!!!

The issue is how you expressed your dates

Try =AND(A2=DATE(2009,10,1),A2=DATE(2009,10,24))

As written Excel does not recognize 10/1/2009 as a date, it does the math 10
divided by 1 divided by 2009
--
If this helps, please remember to click yes.


"gamn" wrote:

I have a problem using AND function on date data.

In cell A2, I have date date "10/1/2009".

In cell A3, I have AND fuction as =AND(A2=10/1/2009, A2=10/24/2009). This
should return a TRUE but instead returns FALSE. Why?


Thank you, BB

  #3  
Old March 23rd, 2010, 09:09 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default "AND FUNCTION" RETURNS FALSE WHEN CRITERIA IS TRUELY MET. HELP!!!

On Tue, 23 Mar 2010 13:47:01 -0700, gamn
wrote:

In cell A2, I have date date "10/1/2009".

In cell A3, I have AND fuction as =AND(A2=10/1/2009, A2=10/24/2009). This
should return a TRUE but instead returns FALSE. Why?


because 10/1/2009 is not the same as "10/1/2009"

The latter, in A2, is interpreted as a date and stored as an integer probably
equal to 40087, depending on the date system you are using in Excel.

The former: 10/1/2009 is computed as 10÷1÷2009 or 0.004978.

To unambiguously enter a date into your formula, you should either use a cell
reference containing the date, or use the DATE function. eg:

=and(a2=date(2009,10,1),a2=date(2009,10,24))

--ron
  #4  
Old March 23rd, 2010, 09:35 PM posted to microsoft.public.excel.worksheet.functions
gamn
external usenet poster
 
Posts: 8
Default "AND FUNCTION" RETURNS FALSE WHEN CRITERIA IS TRUELY MET. HEL

I tried that but still a NO-GO. See link for a screen shot.


https://emerson.sendthisfile.com/Gvn...YGVN1QSDhpQeoc

Thank you, BB

"Paul C" wrote:

The issue is how you expressed your dates

Try =AND(A2=DATE(2009,10,1),A2=DATE(2009,10,24))

As written Excel does not recognize 10/1/2009 as a date, it does the math 10
divided by 1 divided by 2009
--
If this helps, please remember to click yes.


"gamn" wrote:

I have a problem using AND function on date data.

In cell A2, I have date date "10/1/2009".

In cell A3, I have AND fuction as =AND(A2=10/1/2009, A2=10/24/2009). This
should return a TRUE but instead returns FALSE. Why?


Thank you, BB

  #5  
Old March 23rd, 2010, 09:58 PM posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_]
external usenet poster
 
Posts: 2,386
Default "AND FUNCTION" RETURNS FALSE WHEN CRITERIA IS TRUELY MET. HEL

As explained by Paul, the order of parameters for the Date function is:
year, month, day.

Regards,
Fred

"gamn" wrote in message
...
I tried that but still a NO-GO. See link for a screen shot.


https://emerson.sendthisfile.com/Gvn...YGVN1QSDhpQeoc

Thank you, BB

"Paul C" wrote:

The issue is how you expressed your dates

Try =AND(A2=DATE(2009,10,1),A2=DATE(2009,10,24))

As written Excel does not recognize 10/1/2009 as a date, it does the math
10
divided by 1 divided by 2009
--
If this helps, please remember to click yes.


"gamn" wrote:

I have a problem using AND function on date data.

In cell A2, I have date date "10/1/2009".

In cell A3, I have AND fuction as =AND(A2=10/1/2009, A2=10/24/2009).
This
should return a TRUE but instead returns FALSE. Why?


Thank you, BB


  #6  
Old March 23rd, 2010, 10:22 PM posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
external usenet poster
 
Posts: 516
Default "AND FUNCTION" RETURNS FALSE WHEN CRITERIA IS TRUELY MET. HEL

But you did not follow Paul's advice! The syntax of the DATE function is
DATE(year, month, day). This is totally independent of you preferred data
format. In the screen capture you linked us to you have DATE(10,1,2009)
when you need DATE(2009,10,1)
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"gamn" wrote in message
...
I tried that but still a NO-GO. See link for a screen shot.


https://emerson.sendthisfile.com/Gvn...YGVN1QSDhpQeoc

Thank you, BB

"Paul C" wrote:

The issue is how you expressed your dates

Try =AND(A2=DATE(2009,10,1),A2=DATE(2009,10,24))

As written Excel does not recognize 10/1/2009 as a date, it does the math
10
divided by 1 divided by 2009
--
If this helps, please remember to click yes.


"gamn" wrote:

I have a problem using AND function on date data.

In cell A2, I have date date "10/1/2009".

In cell A3, I have AND fuction as =AND(A2=10/1/2009, A2=10/24/2009).
This
should return a TRUE but instead returns FALSE. Why?


Thank you, BB


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.