Why it works
- What it does
- TODAY() minus the due date gives the days since it fell due. Paid invoices and ones not yet due must show 0: test the payment column first, then use MAX(0, …) so the count never goes negative. Comparing a text date with TODAY() quietly fails; subtracting converts it.
- The shape of the formula
- =IF(paid date filled in, 0, MAX(0, TODAY() - due date))
- How to remember it
- Subtract to compare dates: text dates convert, comparisons do not.
- The usual mistake
- Writing IF(C2<TODAY(), …) on dates imported as text. The comparison is always false, so every overdue invoice drops to 0.
Keep practicing
Updated