ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If statement (https://www.excelbanter.com/excel-discussion-misc-queries/222890-if-statement.html)

ajr81

If statement
 
I am trying to create an if statement with dates. Basically, in one cell the
user will enter either fiscal year 2007, 2008 or 2009. Then when they enter
a date range, I want the if statement to verify that the range does in fact
fall within the fiscal year they typed in. So basically:

If---cell C2=2009
Then---cell D8...this is where I get lost. How do you say you need cell D8
to fall within July 1, 2008 and June 30, 2009?
Otherwise---FALSE

Thank you very much for your help.

Sheeloo[_3_]

If statement
 
Use
=IF(AND(D8DATE(C2-1,7,1),D8<DATE(C2,6,30)),TRUE)

This will tell you whether D8 is within the FISCAL year (TRUE) or not (FALSE)

"ajr81" wrote:

I am trying to create an if statement with dates. Basically, in one cell the
user will enter either fiscal year 2007, 2008 or 2009. Then when they enter
a date range, I want the if statement to verify that the range does in fact
fall within the fiscal year they typed in. So basically:

If---cell C2=2009
Then---cell D8...this is where I get lost. How do you say you need cell D8
to fall within July 1, 2008 and June 30, 2009?
Otherwise---FALSE

Thank you very much for your help.



All times are GMT +1. The time now is 04:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com