IF function and date range
If you are just checking for month/year inclusions, you don't need to use a
range...
=IF(AND(MONTH(D16)=1,YEAR(D16)=2009),TRUE,FALSE)
Also, if all you want from the comparison is TRUE or FALSE, you don't need
the IF statement... the first argument to the IF statement evaluates to TRUE
or FALSE (that is how the function knows which of the next two arguments to
pick, so you can just use the first argument all by itself...
=AND(MONTH(D16)=1,YEAR(D16)=2009)
--
Rick (MVP - Excel)
"Hummel Guy" wrote in message
...
I need the syntax for writing an IF function that can search a colum to see
if a date falls into a range. Ex: IF(D16= a date in jan 2009, true,
false).
Thanks
|