# Date Result returns a "Expired" or "Expiring" or "Current"

#### NGB82KS

##### Board Regular
I'm sure I'm just missing something in my statement because i get a formula error, but I'm trying to have my Column "i" look at Column "E" which is a date format.
Column "i" would return "Expired" if the date is <today(), "Expiring" if the date is between today and 120 days, and "Current" if its >121 days.

Table 1
Column EColumn I
9/1/2020EXPIRED (Because its <Today)
10/1/2020EXPIRING (Because it expires between today and 120 days)
2/1/2021CURRENT (Because its >120 days)

Then I need to put the output of "i" in another table for a countifs that will count the total

Table 2
Column BColumn CColumn D
SCHOOL ACURRENT1 (Would Sum if Table 1 Column "i" matched "current" + "expiring")
SCHOOL AEXPIRING3 (Would Sum if Table 1 Column "i" matched "expiring")
SCHOOL AEXPIRED5 (Would Sum if Table 1 Column "i" matched "expired")

Any help would be appreciated.

### Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

#### Joe4

Try this (assuming E2 always has a date):
Excel Formula:
``=IF(E2<TODAY(),"EXPIRED",IF((E2-TODAY())<=120,"EXPIRING","CURRENT"))``

#### Fluff

##### MrExcel MVP, Moderator
For table 1 use
Excel Formula:
``=IF(E2<TODAY(),"Expired",IF(E2<TODAY()+120,"Expiring","Current"))``
What column in Table 1 has the name of the school?

#### NGB82KS

##### Board Regular
For table 1 use
Excel Formula:
``=IF(E2<TODAY(),"Expired",IF(E2<TODAY()+120,"Expiring","Current"))``
What column in Table 1 has the name of the school?
Coulmn G lists the schools by name

#### NGB82KS

##### Board Regular

Try this (assuming E2 always has a date):
Excel Formula:
``=IF(E2<TODAY(),"EXPIRED",IF((E2-TODAY())<=120,"EXPIRING","CURRENT"))``
So that worked, but i do have some blank dates, So i added isblank "
Excel Formula:
``=IF(ISBLANK(E:E),"NA",IF(E:E<TODAY(),"EXPIRED",IF((E:E-TODAY())<=120,"EXPIRING","CURRENT")))``
"

Last edited:

#### Fluff

##### MrExcel MVP, Moderator
Coulmn G lists the schools by name
Excel Formula:
``=COUNTIFS(Sheet1!G:G,B2,Sheet1!I:I,C2)+IF(B2="Current",COUNTIFS(Sheet1!G:G,B2,Sheet1!I:I,"Expiring"),0)``

#### NGB82KS

##### Board Regular
Excel Formula:
``=COUNTIFS(Sheet1!G:G,B2,Sheet1!I:I,C2)+IF(B2="Current",COUNTIFS(Sheet1!G:G,B2,Sheet1!I:I,"Expiring"),0)``
That was it, literllay sat here for 2 hrs looking at websites and videos and you cleared my problem in like 10 Min. Wish i could give More thumbs up and thanks man!

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks for the feedback.

Replies
15
Views
381
Replies
1
Views
98
Replies
0
Views
151
Replies
1
Views
84
Replies
12
Views
1K

1,129,793
Messages
5,638,358
Members
417,021
Latest member
moon miner

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back