Business tasks · Excel formula

Flag overdue invoices

Use IF and AND to identify unpaid invoices past their due date.

Illustrated spreadsheet concept

Use this formula

=IF(AND(B2<TODAY(),C2<>"Paid"),"Overdue","")

The example below uses the column letters and row numbers in the formula. Enter it in a blank cell after the sample data.

See the cells and result

Visual example for Flag overdue invoices with sample rows and expected result

Example data

RowInvoiceDue dateStatus
2INV-1012026-10-15Open
3INV-1022026-12-20Paid
4INV-1032026-10-30Open

Expected result: Overdue.

Why it works

AND checks that the date in B2 has passed and that the status in C2 is not Paid. IF displays Overdue only when both checks are true.

Check this: TODAY changes with the current date. Keep due dates as Excel dates, not text.

Excel versions and testing

The example uses standard worksheet formulas. Open the workbook in a current desktop Excel version; other editions may display or calculate differently.

This original example has been checked against the browser formula engine and the downloadable workbook structure. The workbook has not been verified in every Excel edition. Microsoft function reference.

Common mistake and fix

If the result differs, check the referenced cells and whether numbers are stored as text. Compare with the sample workbook before changing your own data.

Try it yourself

Change a number or label in the data and predict the new result. Use the practice lab to test a supported formula, or download the data to work in Excel.

Try this example onlineDownload Excel workbookDownload CSV