Clamp a number so it never goes below a floor or above a ceiling.
Copy this formula
=MIN(MAX(A2, 0), 100)MAX(A2, 0) pulls anything below zero up to zero, and MIN(…, 100) pushes anything above 100 down to 100. Nesting them clamps the value into the range — useful for scores, percentages, and capped bonuses.
=MIN(MAX(A2, 1), 5)→5Clamps a rating to 1–5.
Yes — use just =MAX(A2, 0) to floor at zero without a ceiling.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.