How to check if a date is past due in Excel
Formula (Excel and Google Sheets)
=IF(AND(C2="",B2<$G$1),"Overdue","")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.
- Result on the example
- one result per row in
D2, filled down toD7 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in D2, filled down to D7. Change any input and the result updates, or edit the formula to experiment.
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.
=IF(AND(C2="",B2<$G$1),"Overdue","")Result""
C210/12/2026The value in C2.
C2=""FALSEThe = operator tests whether the two sides are equal.
B210/15/2026The value in B2.
$G$110/29/2026The value in G1.
B2<$G$1TRUEThe < operator tests less than.
AND(C2="",B2<$G$1)FALSEAND: TRUE if every argument is true.- logical1
C2=""FALSE - logical2
B2<$G$1TRUE
- logical1
IF(AND(C2="",B2<$G$1),"Overdue","")""IF: Returns one value if a test is true, another if false.- logical_test
AND(C2="",B2<$G$1)FALSE - value_if_true
"Overdue"not used - value_if_false
""
- logical_test
In Google Sheets
The same formula works in Google Sheets: =IF(AND(C2="",B2<$G$1),"Overdue",""). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =IF(C2<>"","",IF(B2<$G$1,"Overdue","")) | , Overdue, … | The same logic as nested IFs: paid rows stop at the first test. |
| =IF(AND(C2="",B2<$G$1),$G$1-B2,"") | , 9, …Different result | 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()orDATE(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.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Check if a date is past due
D2, show "Overdue" when the invoice is unpaid and its due date is before the date in G1. Fill down to D7.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).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.