Excel Supreme

Excel track · Exercise 32 of 86 Paid

MROUND and FLOOR: round to a multiple

Round to a pack size or a price step instead of to a number of decimals.

Intermediate

Pallet counts and order lines packed in sixes

Read-only data · screen 1 of 2 · answer in C2

Round each pallet's unit count to the nearest five and put the first one in C2.

ABC
1PalletUnitsNearest 5
2P-0147
3P-0292

Download this grid (.xlsx) Two tabs: the grid you see, and the answer.

C2

What it does

MROUND takes a number and the multiple to land on, so =MROUND(B2,5) asks which multiple of five is nearest to 47. The answer is 45, because 45 is two away and 50 is three away. FLOOR takes the same second argument and always moves down.

The second screen packs in sixes and ships only full packs. =FLOOR(B2,C2) returns 42, which is seven packs, and the five units left over do not fill another. MROUND in that column would return 48 and bill for a pack that was never filled.

Keep the pack size in a cell, not in the formula. A supplier moving from sixes to eights changes one value, where a typed 6 has to be found in every row. MROUND also needs the number and the multiple to share a sign, or it returns #NUM!.

Syntax

=MROUND(number, multiple) and =FLOOR(number, significance)

Worked example

On Pallet counts and order lines packed in sixes, =MROUND(B2,5) returns 45.

=MROUND(B2,5)

Common errors

Error codes for MROUND, FLOOR and CEILING
ErrorWhat it means and how to fix it
#DIV/0!The multiple is zero, and zero gives MROUND no grid of multiples to land on.
#NUM!The number and the multiple have different signs, so MROUND cannot choose a multiple between them.
Wrong directionMROUND where FLOOR is needed returns 48 and promises a pack nobody filled.

At work

A warehouse that ships whole packs, and a price list quoted in five-pence steps, where the multiple is part of the calculation.