Excel Formula: Check If Date is Last N Day of Today
Supposing you have a table in Excel, column B is the product name, column C is the corresponding production date, and the shelf life of the products is 7 days. Now to check if the products are due today, you can use a formula to check if the production dates are last 7 days of today.
If you want to follow along with this tutorial, please download the example spreadsheet.
Generic formula
Syntaxt and arguments
Date: a cell that refers to a date or a date enclosed with double quotation marks that you want to check if it is last n day of today. |
N: the number of day that you use to check. |
Return value
If the date is last n day of today, it returns TRUE;
If the date is not last n day of today, it returns FALSE.
How this formula works
To check if the dates in range C3:C9 are last 7 days of today, please use below formula:
Or directly use a date enclosed with double quotation marks
Press Enter key to get the first result, then drag autofill handle down to show all dates’ results.
Explanation
TODAY function: returns to the date of today.
AND function: tests multiple conditions and returns TRUE or FALSE.
Here the formula is divided into two parts:
date>=(TODAY()-7) checks if the date is last 7 days of today;
date<TODAY() checks if the date is later than today.
While both parts return TRUE, the whole formula returns TRUE, or it returns FALSE.
Relative Formulas
- Check If Date Is Last N Month From Today
Supposing you need to check if staff’s entry date is last 6 months from today, you can use a formula combined by AND, EOMONTH and TODAY functions in Excel to quickly handle the job. - Get number of worday between two dates
To count the number of workdays between two dates, the NETWORKDAYS function in Excel can help. - Get quarter from given date
This tutorial provides formulas for you to get quarter from given dates in Excel. - Get same day last year or next year
In this tutorial, it provides two formulas to separately get the same date last year and next year based on the given date in Excel.
Relative Functions
- Excel DATE Function
Create date with year, month and day - Excel YEAR Function
Returns the year of date in 4-digit serial number format - Excel MONTH Function
The MONTH is used to get the month as integer number (1 to 12) from date - Excel DAY Function
DAY function gets the day as a number (1 to 31) from a date - Excel WORKDAY Function
Add workdays to the given date and returns a workday
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel boasts over 300 features, ensuring that what you need is just a click away...
Supports Office/Excel 2007-2021 & newer, including 365 | Available in 44 languages | Full-featured 30-day free trial.

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
