=IF(AND(Date Field=DATE(2000,1,1),Date Field<DATE(2001,1,1)),TRUE,FALSE)
This assumes that what are calling Date Field is a single cell. If you mean
a range of dates called Date_Field, (you cannot have spaces in a defined
name), then use:
=SUMPRODUCT((Date_Field=DATE(2000,1,1))*(Date_Fie ld<DATE(2002,1,1)))
Which will count the number of date cells that fall within your required
range.
--
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
Replace @mailinator.com with @tiscali.co.uk
"Jason" wrote in message
...
I am trying to write and if statment to include only 2001 dates. However,
I
have dates both in 2000 and 2002. I tried the writing the following
statment
and excel keeps giving me an error:
=IF(Date Field=1/1/2000 AND <1/1/2002, TRUE, FALSE)
Apparently excel doesn't like the and part. How can I go about getting
around this or writing the formula with a new word or character that excel
will accept?
Thanks,
jason