Flag customers who have gone quiet (DAYS + IF)
The problem
Problem statement
Any customer whose last order in B2:B5 is more than 90 days before the report date in E1 is at risk. Put "At risk" or "Active" for the customer on row 2 in the Status cell E2.
Exactly 90 days is still active — the rule is *more than* 90, and the report date must come from E1 rather than today's date.
Problem data
Show the sheet as a table (selectable, copyable)
| A | B | D | E | |
|---|---|---|---|---|
| 1 | Customer | Last order | As of | 2026-03-31 |
| 2 | Acme | 2025-12-01 | Status | |
| 3 | Bolt | 2026-01-20 | ||
| 4 | Cobalt | 2025-12-31 | ||
| 5 | Dana | 2026-03-01 |
Notes
DAYS(end, start) subtracts two dates and returns a number of days, which is what you can compare against a threshold. Using a fixed report date instead of TODAY() keeps the exercise — and any historical report — reproducible.
How to approach
Your answer goes in E2.
- Target cell is E2
- Compare E1 with B2 as dates, not text
- The threshold is > 90, so 90 exactly is still active
- Shape: =IF(DAYS(?, ?)>?, ?, ?)
Function guide
FAQ
How do I count days since the last order?
=DAYS(report_date, last_order) or simply report_date − last_order. Compare the result with your threshold in an IF.
Why does my day count come out negative?
The arguments are in the wrong order, or one of the cells is text rather than a real date. DAYS(end, start) wants the later date first.