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

NGB82KS

Board Regular
Joined
Nov 7, 2019
Messages
82
Office Version
  1. 2016
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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try this (assuming E2 always has a date):
Excel Formula:
=IF(E2<TODAY(),"EXPIRED",IF((E2-TODAY())<=120,"EXPIRING","CURRENT"))
 
Upvote 0
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?
 
Upvote 0
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:
Upvote 0
Coulmn G lists the schools by name
Ok, how about
Excel Formula:
=COUNTIFS(Sheet1!G:G,B2,Sheet1!I:I,C2)+IF(B2="Current",COUNTIFS(Sheet1!G:G,B2,Sheet1!I:I,"Expiring"),0)
 
Upvote 0
Ok, how about
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!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top