check between 2 dates

P

Paul Watkins

Hi
Is it possible to have excel check a date range from something like a form?
for example: I have various data entries on a sheet, the first column has
dates (01/01/04) format.
I would like to be able to check something like: 01/01/04 to 05/01/04.
Thanks in advance
Paul
 
N

Norman Harker

Hi Paul!

Try:
=IF(AND(A1>=--"2004-01-01",A1<--"2004-05-01"),TRUE)
OR:
=IF(AND(A1>=DATE(2004,1,1),A1<DATE(2004,5,1)),TRUE)
OR:
=IF(AND(A1>=E1,A1<E2),TRUE)

The third form is usually best as hard coding makes formulas less
adaptable.

The second form might be better if the DATE arguments are constructed
by formulas.

First form is an efficient form of hard coding dates in a format that
is accepted by all international versions of Excel.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]

It is imperative that the patches provided by Microsoft in its April
Security Release be applied to Systems as soon as possible. It is
believed that the likelihood of a worm being released SOON that
exploits one of the vulnerabilities addressed by these patches is VERY
HIGH.
See:
http://www.microsoft.com/security/protect/
 
F

Frank Kabel

Hi
not quite sure what you're trying but you could use the
following formula
=IF(AND(A1>=DATE(2004,4,1),A1<=DATE(2004,4,5)),"within
range", "out of range")

Regards
Frank
 
P

Paul Watkins

Thanks
All work great

Paul

Frank Kabel said:
Hi
not quite sure what you're trying but you could use the
following formula
=IF(AND(A1>=DATE(2004,4,1),A1<=DATE(2004,4,5)),"within
range", "out of range")

Regards
Frank
 
Top