Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Tue, 26 Aug 2008 05:38:00 -0700,    group: microsoft.public.access        back       


IF and using dates question   
Can anyone advise why this formula would not return OK.

Cell H188 = 1/3/2008

The formula is:
=IF(AND(H188>12/31/2007,H188< 2/1/2008), "OK", "Not OK")

The result = Not OK

Seems to me that formula is checking the cell for dates between 12/31/2007 
and 2/1/2008 and therefore 1/3/2008 would result in OK.
date: Tue, 26 Aug 2008 05:38:00 -0700   author:   MikeB

Re: IF and using dates question   
"MikeB"  wrote in message 
news:F1146D99-5628-4DB7-A6E2-327D7EF17FC2@microsoft.com...
> Can anyone advise why this formula would not return OK.
>
> Cell H188 = 1/3/2008
>
> The formula is:
> =IF(AND(H188>12/31/2007,H188< 2/1/2008), "OK", "Not OK")
>
> The result = Not OK
>
> Seems to me that formula is checking the cell for dates between 
> 12/31/2007
> and 2/1/2008 and therefore 1/3/2008 would result in OK.

Mike,

It appears from your reference to "h188" that you are using Excel and 
not Access.  Access in the name of this newsgroup refers to the Access 
database program.   If my answer below doesn't work, please repost 
your question to a newsgroup for Excel.

I believe the reason why your formula doesn't work is that it is not 
interpreting 12/31/2007 and 2/1/2008 as dates.
Try:

=IF(AND(H188 > DATEVALUE("12/31/07"), H188<DATEVALUE("2/1/2008")), 
"OK", "Not okay")

An alternative would be to enter your date values (12/31/07) into 
other cells in the spreadsheet and refer to those cell addresses 
directly.

I hope this helps.
Julie
date: Tue, 26 Aug 2008 09:03:09 -0400   author:   JulieS

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us