Write an exact mixed-number label

Turn a top number 7 and bottom number 4 into 1 3/4, exactly.

What you'll make

In Excel: 7/4 becomes 1 3/4.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1QUOTIENT(A8,B8)How many whole times 4 fits in 7. LET calls it whole.1
2MOD(A8,B8)What is left over. LET calls it remn.3
3GCD(remn,B8)The largest number that divides both. LET calls it g.1
4IF(remn=0, … )Writes the whole number, then the reduced leftover."1 3/4"
5LET( … )Names each step so the formula reads in order."1 3/4"

Nothing is left over in 8/4, so it shows only 2. Under one, like 3/4, there is no 0 in front.

=LET(whole,QUOTIENT(A8,B8),remn,MOD(A8,B8),g,GCD(remn,B8),IF(remn=0,whole&"",IF(whole=0,"",whole&" ")&remn/g&"/"&B8/g))

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own numbers. Paste the top numbers into column A and the bottom numbers into column B of the Template tab. The mixed numbers fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Use whole numbers of zero or more, with a bottom number above zero. Decimals and minus signs aren't handled here.

Microsoft's help: GCD function