Test Whether a Number Falls Between Two Values
A carton discount applies only to orders of 10 to 20 units. You need each order labeled in or out of that window — and orders of exactly 10 or exactly 20 must count as in.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
Spreadsheets have no single "between" operator, so you test each end separately and let AND require both: at least 10 AND at most 20. AND returns TRUE only when every condition inside it passes, and IF converts that into your labels. The operators define whether the boundaries count — >= and <= include exactly 10 and exactly 20, while > and < would exclude them. Decide that before you write the formula; it's the difference between a 10-unit order getting the discount or not.
When to use it
Use it for quantity discount bands, acceptable tolerance ranges on measurements, invoice amounts within an approval threshold, or response times inside an SLA window.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveDownload the proof sheet (.xlsx)Last reviewed 2026-07-09