How to Use Excel Formulas for Expired Dates and 30-Day Warnings
Question details
The user needs to create an Excel formula that categorizes dates into specific statuses (Expired, Refresh, In Date) based on the current date, and resolve formula parse errors related to regional list separators.
- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Tracking document expirations, subscription renewals, or inventory, and attempting to implement an automated 30-day warning system.
- Observed behavior
- Applying IF and TODAY() logic correctly to output the desired status, while troubleshooting delimiter errors caused by different regional settings (commas vs. semicolons).
Before writing your formula, check your computer's regional settings to know whether your system uses a comma (,) or a semicolon (;) to separate function arguments in Excel. Using the wrong one will result in a formula error.
Set Up a Basic Expiration Date Formula
Use a simple IF function combined with TODAY() to check if a target date has already passed the current date.
This formula allows you to compare a specific cell containing a date with today's date dynamically. It updates automatically every time you open the workbook.
Click on the cell where you want the status text (e.g., 'Expired' or 'In Date') to appear.
Type the formula: =IF(A2<=TODAY(), "Expired", "In Date") assuming your target date is located in cell A2.
If Excel throws an error, replace the commas with semicolons: =IF(A2<=TODAY(); "Expired"; "In Date").
Press Enter, then click and drag the fill handle at the bottom-right corner of the cell downwards to apply this formula to your other dates.
Create a Nested Formula with a 30-Day Warning
Combine multiple IF functions to add a secondary 'Refresh' or 'Warning' status for dates expiring within the next 30 days.
Track Dates and Set Reminders in WPS Spreadsheet
WPS Spreadsheet fully supports the TODAY and IF functions, allowing you to seamlessly track expiration dates. You can also apply powerful conditional formatting to visually highlight warnings and expired items.
- 1. Open your data file: Launch WPS Spreadsheet and open the document containing your dates.
- 2. Input the tracking formula: Use the nested IF and TODAY() formulas exactly as you would in Excel to generate your status column.
- 3. Access conditional formatting: Go to the Home tab and click on 'Conditional Formatting' in the toolbar.
- 4. Create highlight rules: Select 'Highlight Cells Rules' > 'Text that Contains', and set 'Expired' to be highlighted in red and 'Refresh' in yellow.

Frequently Asked Questions
Why does my IF formula return a #NAME? or parse error?
This error frequently occurs due to incorrect list separators. Different regions use different characters to separate formula arguments. Try replacing the commas (,) in your formula with semicolons (;), or vice versa.
How do I visually highlight the expired dates in red?
Select the column with your formulas, go to 'Conditional Formatting' > 'Highlight Cells Rules' > 'Text that Contains'. Type the word 'Expired' and choose a light red fill with dark red text.
Does the TODAY() function update automatically?
Yes, the TODAY() function is dynamic. It will recalculate and use the current system date every time you open the spreadsheet or whenever the sheet is recalculated.
Can I check if a date is within a past range, like expired more than 30 days ago?
Yes. You can modify the formula to check for older dates. For example: =IF(A2<TODAY()-30, "Severely Overdue", IF(A2<TODAY(), "Expired", "In Date")).




