Formula Errors

Fix Excel Formula Returning "Due Within 90 Days" for Past Dates

Steve KSteve K Nov 3, 2026 869 views

Question details

A nested IF formula used for tracking dates is evaluating conditions out of order, incorrectly returning a status of "Due Within 90 Days" for dates that have already passed.

How to Fix Excel Formula Returning "Due Within 90 Days" for Past Dates
Product
Excel
Device & OS
not provided
Scenario
Creating a dynamic status tracker using formulas to categorize dates into statuses like "Current", "Due Within 90 Days", or "Past Due" based on a specific reference date cell.
Observed behavior
The formula correctly identifies future dates but incorrectly labels dates earlier than the reference date as "Due Within 90 Days" instead of displaying the expected "Past Due" status.
Before you start

Ensure that both your reference date cell and the target date cells are formatted as Dates rather than Text, as Excel requires valid date serial numbers to perform accurate mathematical subtraction.

Solution 1Recommended

Reorder the Nested IF Conditions

Excel's IF function evaluates conditions sequentially and stops at the first TRUE result. Reordering the logic to check for the largest date differences first will correctly filter out past dates.

The issue stems from the order of the conditions in the original formula. When subtracting dates, past dates result in a negative number. If your formula checks for "<90" too early in the logic sequence, negative numbers will also trigger a TRUE result because any negative number is mathematically less than 90.

1
Select the status cell

Click on the cell where you want the due date status to appear in your spreadsheet.

2
Input the corrected formula

Type the updated formula: =IF(OR(R10={"New","Not Required"}),R10,IF(R10-$I$1>90,"Current",IF(R10-$I$1>=0,"Due Within 90 Days","Past Due")))

3
Apply the formula to the column

Press the Enter key to calculate the result. Click and drag the fill handle (the small square at the bottom-right corner of the cell) down to apply this correct logical sequence to the rest of your date column.

Reorder the Nested IF Conditions
How This Logic Works: This formula first isolates 'New' or 'Not Required' statuses. It then checks if the date is more than 90 days in the future to label it 'Current'. Next, it checks if the difference is 0 or greater to label it 'Due Within 90 Days'. Any remaining dates (negative differences) naturally fall to the final FALSE condition, accurately returning 'Past Due'.
Efficient Formula Management

Easily Manage Nested Formulas in WPS Office

Writing and troubleshooting complex IF functions is much easier in WPS Spreadsheet. With built-in formula syntax hints and 100% compatibility with Excel date functions, you can track deadlines effortlessly.

  1. 1. Open your document: Launch WPS Office and open the spreadsheet containing your date tracking table.
  2. 2. Enter the IF formula: Select the status output cell and type =IF( to trigger smart formula hints.
  3. 3. Input the logic sequence: Follow the on-screen syntax guide to enter your >90 and >=0 conditions in the correct descending logical order.
  4. 4. Fill down the column: Hit Enter and double-click the cell's fill handle to apply the corrected formula instantly to all remaining rows.
100% compatible with Excel date functions and nested IF logicSmart formula prompts to help you enter syntax and conditions correctlyBuilt-in error checking to easily spot broken formula sequencesFree, lightweight, and works seamlessly across Windows, Mac, and Linux
microsoft office alternative - wps office

Frequently Asked Questions

Why do past dates evaluate as less than 90 in Excel formulas?

In Excel, dates are stored as serial numbers. When you subtract a past date from a newer reference date, the result is a negative number. Since negative numbers are mathematically less than 90, any formula checking for `<90` will incorrectly capture past dates unless those negative numbers are filtered out by a previous IF condition.

What is the correct syntax for the Excel DAYS function?

The syntax is `DAYS(end_date, start_date)`. It returns the number of days between the two dates. If you mistakenly put the older date as the `end_date`, the function will return a negative number, which can disrupt your tracking logic.

How can I conditionally format "Past Due" dates in red?

Select the column containing your formula results. Go to the Home tab, click 'Conditional Formatting', choose 'Highlight Cells Rules', and select 'Equal To'. Type 'Past Due' into the box and choose the 'Light Red Fill with Dark Red Text' formatting option.