# How to check if a date is past due in Excel

Flag unpaid rows whose due date is before today: =IF(AND(C2="",B2<$G$1),"Overdue",""), with =TODAY() or an as-of date in G1.

**Excel:** `=IF(AND(C2="",B2<$G$1),"Overdue","")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- |
| Invoice | Due date | Paid on | Status |  | As of | 2026-10-29 |
| INV-301 | 2026-10-15 | 2026-10-12 |  |  |  |  |
| INV-302 | 2026-10-20 |  |  |  |  |  |
| INV-303 | 2026-10-29 |  |  |  |  |  |
| INV-304 | 2026-11-05 |  |  |  |  |  |
| INV-305 | 2026-09-30 | 2026-10-02 |  |  |  |  |
| INV-306 | 2026-10-01 |  |  |  |  |  |

Formula in D2, filled to D7: `=IF(AND(C2="",B2<$G$1),"Overdue","")`

Result: ; Overdue; ; ; ; Overdue

## How it works

Dates are numbers, so `B2<$G$1` asks whether the due date is earlier than the as-of date. AND adds the second condition, that no payment date has been entered. INV-303 is due today, which is not yet overdue. In a live sheet put `=TODAY()` in `G1`; a fixed date keeps a report reproducible.

## Other ways

- `=IF(C2<>"","",IF(B2<$G$1,"Overdue",""))`: The same logic as nested IFs: paid rows stop at the first test.
- `=IF(AND(C2="",B2<$G$1),$G$1-B2,"")`: Shows how many days overdue instead of a label. (Shows 9 and 28 days instead of "Overdue".)

## Common mistakes

- Comparing with a typed date in quotes, like `B2<"10/29/2026"`, compares a number with text and never works. Use a cell, `TODAY()` or `DATE(2026,10,29)`.
- Due dates imported as text never compare correctly. Check with `=ISNUMBER(B2)`.
- Without the paid check, every invoice from last month shows as overdue even after it was paid.

## Questions

**How do I highlight overdue rows instead?**

Use the test as a conditional formatting rule on the whole table: `=AND($C2="",$B2<TODAY())`.

**How do I count overdue invoices?**

Use COUNTIFS: `=COUNTIFS(C2:C7,"",B2:B7,"<"&G1)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/if-date-is-past-due
