Rounding to a step with FLOOR and CEILING
For the sale, every price is cut down to a multiple of £5: £47 becomes £45, and £50 stays £50.
keyboard Typing formulas is easiest on a computer with a keyboard.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Item | Price | Sale price | |
| 2 | Gaiters | 11 | ||
| 3 | Rucksack | 33 | ||
| 4 | Head torch | 92 | ||
| 5 | Tent | 72 | ||
| 6 | Water filter | 54 | ||
| 7 | Walking boots | 60 | ||
| 8 | Sleeping bag | 94 | ||
| 9 | ||||
| 10 | ||||
| 11 | ||||
| 12 |
How FLOOR and CEILING and MROUND works
What do
FLOORandCEILINGdo?They round to a multiple of a number you choose, instead of to decimal places:
=CEILING(43,10)rounds up to a multiple of 10: 50.=FLOOR(47,5)rounds down to a multiple of 5: 45.
A number that is already a multiple stays as it is.
When are they useful?
Whenever things come in fixed sizes: chairs in stacks of 10, eggs in boxes of 6, prices that end in 0 or 5, meetings booked in 15-minute slots. The step can be a decimal too:
=CEILING(B2,0.05)rounds a price up to the next 5p.How are they different from
ROUNDUP?ROUNDUPandROUNDDOWNwork in decimal places:ROUNDUP(43,-1)gives 50, but there is no way to say "multiples of 6".CEILINGandFLOORtake any step.What about the nearest multiple?
MROUNDgoes to whichever multiple is closest:=MROUND(43,5)is 45,=MROUND(42,5)is 40.
Know someone fighting with a spreadsheet? Send them this page.