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

NGB82KS

Board Regular
Joined
Nov 7, 2019
Messages
59
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

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

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,957
Office Version
  1. 365
Platform
  1. Windows
Try this (assuming E2 always has a date):
Excel Formula:
=IF(E2<TODAY(),"EXPIRED",IF((E2-TODAY())<=120,"EXPIRING","CURRENT"))
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,671
Office Version
  1. 365
Platform
  1. Windows
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
Joined
Nov 7, 2019
Messages
59
Office Version
  1. 2016
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
Joined
Nov 7, 2019
Messages
59
Office Version
  1. 2016

ADVERTISEMENT

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
Joined
Jun 12, 2014
Messages
56,671
Office Version
  1. 365
Platform
  1. Windows
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)
 

NGB82KS

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

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,671
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
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.
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
Top