Archive of Mr Excel Message Board


Back to Dates in Excel archive index
Back to archive home

Return a value if date is between two dates

Posted by Corey on October 16, 2001 3:02 PM
I would like to create an IF statement that will return a value if the date in a cell (R6) is between two dates (B1 and B2).

I can easily create an if statement that works based on only one date, but I'm having trouble getting it too work with two dates. Thanks.


Re: Return a value if date is between two dates

Posted by Aladin Akyurek on October 16, 2001 3:09 PM
Corey,

=IF(AND(R6 >= B1,R6 <= B2, R6, "")

will return R6 in case it is in between B1 and B2 inclusive.

Aladin

======


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.