Solved If Statement using a date range

August 19, 2015 at 04:34:41
Specs: Windows 7
Hi,
d
I would like to use the IF function but I wanted to use it based on various date ranges.
i.e. A1 contains 9/1/2015-10/15/2015
Therefore I need an IF statement to say based on TODAY's date is this date range active or expried
or would I need to place the start/end date in different columns and add another formula.

Thanks


See More: If Statement using a date range

Report •

#1
August 19, 2015 at 05:19:28
It would be much simpler to use 2 columns because Excel is not going to recognize your "date range" as a date. At best it is going to see it as a text string. You would then need to extract the dates using text functions such as LEFT, RIGHT, etc. and then convert the extracted strings into something that Excel recognizes as dates. It's doable, but it seems like way too much work to me.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
August 19, 2015 at 07:28:04
✔ Best Answer
or would I need to place the start/end date in different columns

Using two cells for your Start Date & End Date like:

     A              B
1) 9/1/2015     10/15/2015
 

In cell C1 enter the formula:

=IF(AND(A1<=TODAY(),B1>=TODAY()),"Active","Expired")

See how that works for you.

MIKE

http://www.skeptic.com/


Report •
Related Solutions


Ask Question