Excel guide · 4 min read
How to track expiration dates in Excel
=E2-TODAY(). For a status, use =IFS(E2<TODAY(),"Expired",E2-TODAY()<=30,"Expiring soon",TRUE,"OK"), with the 30 in its own cell so you can change the warning window. Add conditional formatting so expired rows turn red.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Item | Holder | Issued | Valid (months) | Expires | As of | Nov 5, 2026 | |
| 2 | First aid certificate | Rosa Diaz | Nov 20, 2024 | 24 | Nov 20, 2026 | Warn within (days) | 30 | |
| 3 | Forklift license | Tom Baker | Dec 1, 2023 | 36 | Dec 1, 2026 | |||
| 4 | Food handler card | Ana Silva | Oct 15, 2024 | 24 | Oct 15, 2026 | |||
| 5 | Design software license | Office | Nov 28, 2025 | 12 | Nov 28, 2026 | |||
| 6 | Cleaning contract | Office | Jan 31, 2025 | 24 | Jan 31, 2027 | |||
| 7 | Vehicle insurance | Van 2 | Jun 10, 2026 | 6 | Dec 10, 2026 | |||
| 8 | Fire extinguisher check | Warehouse | Oct 31, 2025 | 12 | Oct 31, 2026 | |||
| 9 | Domain name | Office | Mar 31, 2026 | 12 | Mar 31, 2027 |
Download this sheet as an Excel practice file (.xlsx)
Step 1: Get the expiry date (EDATE does the math)
You look after the office's certificates, licenses and contracts. Something always lapses because nobody noticed. A sheet with an Issued date and a Valid (months) column fixes that: Excel works out the expiry date for you.
=EDATE(C2,D2) adds the months to the issue date. A first aid certificate issued Nov 20, 2024 and valid for 24 months expires Nov 20, 2026. Format the column as a date, or you'll see a serial number like 46346.
Watch the month ends. EDATE on Jan 31 plus 1 month lands on Feb 28, because February has no 31st. If a certificate is "valid until the day before", use =EDATE(C2,D2)-1. For contracts that end on the last day of a month, =EOMONTH(C2,D2) is the cleaner choice.
Result: Feb 28, 2025
Feb 28, 2025: EDATE can't land on Feb 31, so it uses the last day of February.
Step 2: Days left, from an as-of date
Subtract the as-of date from the expiry date. This sheet keeps the as-of date in H1 (Nov 5, 2026) so the numbers here stay the same. In your file, put =TODAY() in H1 and every row updates each time you open it.
Positive numbers are days to go, negative numbers are days past. The first aid certificate has 15 days left, the food handler card is 21 days past. Lock the as-of cell with $H$1 so it stays put when you fill down.
Result: spills 8 rows × 1 column
| 15 |
| 26 |
| -21 |
| 23 |
| 87 |
| 35 |
| -5 |
| 146 |
15, 26, -21, 23, 87, 35, -5, 146: days left for each item, negative once it has expired.
Step 3: A status column with the warning window in a cell
Numbers are good for sorting. Words are better for a quick look. IFS checks the conditions in order and stops at the first one that's true, so Expired must come first.
Keep the warning window in its own cell (H2 holds 30 days) instead of typing 30 into the formula. Need 60 days' notice for contracts? Change one cell. The vehicle insurance with 35 days left shows OK now and Expiring soon the moment you set H2 to 60.
If some rows have no date yet, wrap it: =IF(E2="","No date",IFS(...)). Otherwise an empty date counts as day zero in 1900 and shows Expired. IFS needs Excel 2019 or later; in older versions, nest IF instead.
Result: Expiring soon
Expiring soon: the first aid certificate has 15 days left, inside the 30-day window.
Step 4: Count them, and list what expires next
A summary at the top saves scrolling. =COUNTIF(E2:E9,"<"&H1) counts expired items: 2. The formula below counts the ones expiring within the window: 3. The "&" glues the comparison sign to the date in the cell.
In Excel 365, FILTER and SORT give you the actual list, soonest first: the first aid certificate, the design software license and the forklift license. =XLOOKUP(MIN(FILTER(E2:E9,E2:E9>=H1)),E2:E9,A2:A9) names the single next item to expire.
Result: 3
3 items expire in the next 30 days.
Step 5: Color the rows
Conditional formatting makes the sheet scream at you before anything lapses. One rule for red, one for amber. The $ before E keeps every cell in the row looking at the date column.
Home > Conditional Formatting > Highlight Cells Rules > A Date Occurring has options like Next Month, but those are calendar periods, not "the next 30 days". The formula rules below follow your warning cell instead.
- Select A2:E9 (start from A2).
- Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
- Enter =$E2<$H$1, choose a red fill, click OK.
- Add a second rule:
=AND($E2>=$H$1,$E2-$H$1<=$H$2)with an amber fill. - Sort by the Expires column (Data > Sort) so the urgent rows sit at the top.
Common mistakes
Blank expiry dates show as Expired
An empty cell counts as 0, the oldest date Excel has. Test for blanks first with IF(E2="","No date",...).
Dates stored as text
Pasted dates that sit on the left of the cell are often text, and the subtraction gives #VALUE!. Convert them with Data > Text to Columns > Finish or DATEVALUE.
Putting TODAY() in every formula
It works, but you can't test the sheet for a future date. One as-of cell with =TODAY() is easier to check and change.
Wrong order in IFS
If "Expiring soon" is tested first, expired items (with negative days, also under 30) land there. Test Expired first.
FAQ
How do I get an email reminder when something expires in Excel?
Excel itself doesn't send email. Keep the status column and open the file regularly, or connect the sheet to Power Automate if your company uses Microsoft 365, which can send a message when a row is due.
How do I calculate an expiry date 90 days from a date?
Add the days: =C2+90. Use EDATE for months (=EDATE(C2,3)) and EDATE with 12 x years for years, because months have different lengths.
Can I track food or pantry expiration dates the same way?
Yes. Put the best-before date in the Expires column, use a short warning window like 3 days, and the same status, count and color rules work.
How do I show months left instead of days?
=DATEDIF(H1,E2,"m") gives whole months between the as-of date and the expiry date. It returns #NUM! once the date has passed, so wrap it in IF(E2<H1,0,...).
Functions used
EDATESame day, months laterEOMONTHLast day of a monthTODAYToday’s dateIFSFirst true test winsIFPicks a result from a testCOUNTIFCounts cells that matchCOUNTIFSCounts with several conditionsFILTERKeeps matching rows, spillsSORTSorts a range, spillsXLOOKUPModern lookup in any directionMINSmallest numberANDTrue if all tests are trueDATEDIFWhole years, months or days between
Related guides
- Countdown in Excel: how many days until a date
- Highlight overdue and upcoming dates in Excel
- How to add months to a date in Excel
- How to calculate due dates and days overdue in Excel
- How to list all dates between two dates in Excel
- How to sum by month in Excel
- How to calculate years of service in Excel
Updated