← All Kits · Excel Kit · Article 0: the build order

Show the Unit Without Breaking the Number

Article 8 of Excel for Business Analysts · Ctrl+1, Custom, and the five formats worth knowing · Part of the Analyst Prep Kit

This article gives you the move that lets a cell read "21.2x" while it still holds 21.1919 underneath: a custom number format. Press Ctrl+1, pick Custom, type 0.0"x". The display changes. The number does not.

The principle is one line, and it is the whole article: format changes appearance, substance stays put. Anything you type into the cell changes substance. So any time you catch yourself typing a unit, a "k", a symbol, or a word next to a number, you are about to destroy a number.

The short version. Never type 21.2x. Format 21.1919 to display as 21.2x. The cell still divides, charts, sums and feeds formulas, because it never stopped being a number.

The example is real, from the build behind this series. The KPI row's audience gap came out of AVERAGEIF as 21.1919: found games average 2,458,263 owners against 116,000 for the hidden ones. The dashboard shows 21.2x. The cell holds the full number. Both figures were re-run against the file before publishing.

What's here
  1. What typing the unit destroys
  2. Where the setting lives
  3. Reading a format code
  4. The five formats worth knowing
  5. The comma trick: thousands and millions
  6. Four sections: negatives, zeros, text
  7. When it is not a formatting problem
  8. Run it on your own file
  9. A cheat sheet

What typing the unit destroys

Predict the damage first. A KPI cell holds the formula result 21.1919. You retype it as "21.2x" so it reads better. Name one thing elsewhere in the workbook that just broke.

The moment the x lands, the cell holds text. Everything that treated it as a number fails, and most of it fails quietly:

What pointed at the cellWhat happens now
A formula dividing by it#VALUE!, the one loud failure in the list
A SUM or AVERAGE including itSilently skips it. The total changes with no error
A chart plotting itThe point drops out, or plots as zero
SortingText sorts apart from numbers: 21.2x files after 100
The next person's editThey inherit a dashboard where one KPI is decoration

SUM skipping text is the dangerous one, because a total that quietly excludes a member is exactly the shape of error article 2's checks exist for: confident, formatted, wrong.

Where the setting lives

  1. Select the cell, press Ctrl+1. The Format Cells dialog opens on the Number tab.
  2. Pick Custom, at the bottom of the category list.
  3. Type the code in the Type box. The sample line above the box shows the live result before you commit. OK.

The formula bar is the proof that nothing was harmed. Click the cell: the display says 21.2x, the bar says the formula, and the underlying value is still 21.1919 to full precision.

Reading a format code

A format code is a tiny stencil the number is pushed through. Three symbols cover analyst use:

SymbolMeansExample
0Always show a digit here, pad with zero if needed0.0 shows 21.2, and 5 as 5.0
#Show a digit here only if there is one#,##0 shows 2,458,263, and 12 as 12
"text"Print these characters literally0.0"x" shows 21.2x

Say what 0.0"x" does out loud, in order: one decimal place, then a literal x. Every code in the next section reads the same way, left to right.

The five formats worth knowing

These five cover nearly everything a dashboard needs, and no more. All are from real use, and the first two are in the build's KPI row.

CodeShowsJob
0.0"x"21.1919 → 21.2xA multiple or ratio with its unit
#,##0,"k"2,458,263 → 2,458kBig counts, compressed by a thousand
#,##0,,"M"2,458,263 → 2MVery big counts, compressed by a million
$#,##0.001234.5 → $1,234.50Money, without the Currency preset's extra baggage
0.0%0.229 → 22.9%Shares, one decimal, per article 7

Anything in quotes prints literally, so 0.0" hrs", #,##0" games" and 0" pts" are the same idea wearing different units. You now know how to write formats nobody taught you.

The comma trick: thousands and millions

The trailing comma is the one piece of this that looks like a typo and is not. A comma at the end of the code divides the displayed value by 1,000. Two commas divide by a million. The stored value never moves.

That is how the build's owner counts fit in a KPI tile: 2,458,263 displays as 2,458k, and the cell still holds every digit, so the 21.2x ratio computed from it stays exact. Round the display, never the data. The moment you round the data itself, every downstream calculation inherits the rounding, and your checks start disagreeing with your display.

Four sections: negatives, zeros, text

A format code can hold up to four sections separated by semicolons: positive; negative; zero; text.

#,##0;[Red]-#,##0;"–"

Read it left to right: positives with thousands separators, negatives red with a minus, zeros as a dash. This is how finance sheets get red negatives without anyone touching font color, and how a dashboard shows a quiet dash instead of a noisy 0.

Use it when you need it and not before. One section is the normal case, and a wall of semicolons in every cell is its own readability problem.

When it is not a formatting problem

The boundary, so this tool does not get overused: a format changes how a true number is displayed. It cannot fix a number that is not true, and it cannot turn text back into numbers.

If 08053 lost its zero at import, that is article 4's problem, and a 00000 format only papers over it: the display shows 08053 while the cell holds 8053, and any join against real zips still fails. Display and substance disagreeing on purpose is worse than either being wrong alone. Fix the substance first, then format it.

Run it on your own file

  1. Find a cell where you typed a unit. Search for x, k, or hrs in a numeric column if you are not sure. Any hit is a broken number.
  2. Put the real number back. The formula or the raw value, no unit.
  3. Ctrl+1, Custom, write the stencil. Digits first, unit in quotes.
  4. Check the formula bar. Display shows the unit, bar shows the number. That disagreement is the feature working.
  5. Test one downstream formula. A SUM or division that touches the cell should now include it. If a total just changed, the typed unit had been silently excluding it, and you have found a real error on your page.
Get the reps on the formulas the formats sit over.

The Excel Kit drills AVERAGEIF, the KPI patterns and the rest of analyst Excel with worked examples and a mock exam. The stencil habit is yours from this page.

Open the Excel Kit →

A cheat sheet

You wantCodeWatch for
A ratio with its unit0.0"x"Quotes around anything literal
Thousands compression#,##0,"k"The trailing comma is the divider, not a typo
Millions compression#,##0,,"M"Two commas, two divisions
Money$#,##0.00Fix substance before display
Percent, one decimal0.0%The % multiplies the display by 100; store 0.229, not 22.9
Red negatives, dash zeros#,##0;[Red]-#,##0;"–"Sections are positive; negative; zero; text
To check nothing brokeRead the formula barDisplay and bar should disagree. That is the point
The one habit to keep. The moment you catch yourself typing a unit next to a number, stop, put the number back, and write the unit into the format instead. Can you still do arithmetic with the cell? Then you did it right.
The series: Excel for Business Analysts.

Every article comes out of one step of the same real build, in build order. Links go live as each one publishes.

  1. Build a dashboard in this order: correct, then clear, then compelling
  2. Label your rows before you chart them
  3. Check your work before anyone else does
  4. Name your data so your formulas stop breaking
  5. The dialog that quietly deletes your zip codes
  6. A pivot table is a question, not a report
  7. Excel just summed your ID numbers and said nothing
  8. Percentages are the whole story and Excel hides them
  9. Show the unit without breaking the number (this article)
  10. Pick the chart your number already decided
  11. Chart design basics: take things away, then point
  12. One row at a time, or all rows at once
  13. Four numbers across the top do more than four charts
  14. Sort your bar chart or it means nothing
  15. The finding that was just your own definition
  16. The names came in as gibberish and Excel said nothing
  17. Make one control drive every chart on the page
  18. Write the sentence your dashboard is arguing

Which cell in your current workbook has a typed unit in it right now? Go press Ctrl+1 on it and watch a total somewhere quietly correct itself.