Write a percent with chosen decimals

Turn 0.125 into 12.5% with the number of decimals you choose.

What you'll make

In Excel: 0.125, 1 decimal becomes 12.5%.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1A8The value, where 1 means 100%.0.125
2IF(B8=0, … )Adds a decimal point and one 0 per decimal.".0"
3&"%"Adds a percent sign, which also multiplies by 100."0.0%"
4TEXT( … )Writes the value using that pattern."12.5%"

The pattern starts with "0", then parts 2 and 3 add the decimals and the % sign. With 0 decimals there is no decimal point.

=TEXT(A8,"0"&IF(B8=0,"","."&REPT("0",B8))&"%")

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 values. Paste values and decimals into the green columns of the Template tab. The percentages fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Use values where 1 means 100%. A value already stored as 12.5 would show as 1250.0%.

Microsoft's help: TEXT function