Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Use of dates in conditional and AND formulas

I'm not getting good values when I use dates in conditional or AND formulas.
Example: =if(A11/1/2004),1,0)
Example: =IF(AND(A11/1/2004,A1<1/1/2007),1,0)

Everything comes back either true or false, but not true to case.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Use of dates in conditional and AND formulas

Try

=IF(A1--"2004-01-01",1,0)

or


=IF(A1DATE(2004,1,1),1,0)


change the date the same way for your AND formula

--


Regards,


Peo Sjoblom

"Pam D in Indy" <Pam D in wrote in message
...
I'm not getting good values when I use dates in conditional or AND
formulas.
Example: =if(A11/1/2004),1,0)
Example: =IF(AND(A11/1/2004,A1<1/1/2007),1,0)

Everything comes back either true or false, but not true to case.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Use of dates in conditional and AND formulas

Try it this way:

=IF(A1--"1/1/2004",1,0)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Pam D in Indy" <Pam D in wrote in message
...
I'm not getting good values when I use dates in conditional or AND
formulas.
Example: =if(A11/1/2004),1,0)
Example: =IF(AND(A11/1/2004,A1<1/1/2007),1,0)

Everything comes back either true or false, but not true to case.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Use of dates in conditional and AND formulas

1/1/2004 is equal to 1 divided by 1 then divided by 2004, which gives a
number equivalent to a date and time of 43.11 seconds after midnight on 0th
Jan 1900.
That's the date and time with with you are comparing. That's why the other
folk have told you how to put the correct date into your formula.
--
David Biddulph

"Pam D in Indy" <Pam D in wrote in message
...
I'm not getting good values when I use dates in conditional or AND
formulas.
Example: =if(A11/1/2004),1,0)
Example: =IF(AND(A11/1/2004,A1<1/1/2007),1,0)

Everything comes back either true or false, but not true to case.



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
Dates and formulas Office Jnr Excel Discussion (Misc queries) 7 December 11th 06 02:18 PM
using dates and time in formulas changetires Excel Discussion (Misc queries) 1 June 26th 06 08:40 PM
USING DATES IN FORMULAS Carlos Benavides Excel Discussion (Misc queries) 2 October 28th 05 01:01 AM
Using dates in formulas cheryl Excel Worksheet Functions 1 September 9th 05 05:38 PM
help with formulas and dates??? n0 h4ck1ng Excel Discussion (Misc queries) 9 August 15th 05 08:02 AM


All times are GMT +1. The time now is 03:20 AM.

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

About Us

"It's about Microsoft Excel"