The number-formats lesson
established the constitution: values are truth, display is
costume, and the costume can’t touch the numbers. This lesson is
the tailoring course. Behind Ctrl+1 → Custom sits a small
pattern language — one line of symbols that controls exactly how
a value dresses — and knowing a dozen of its words replaces a
hundred ugly workarounds.
The grammar: four sections, one line
A custom format is up to four patterns separated by semicolons:
positive ; negative ; zero ; text
Give fewer and Excel fills sensibly (one pattern covers everything). The accountant’s classic uses all four ideas at once:
#,##0;[Red](#,##0);"—";@
Positives with thousands separators; negatives red and
bracketed; zeros as a quiet dash; text passed through (@ means
“the text itself”). One line, and a column reads like a
published report — while every underlying value stays exactly
what the formulas
need.
The vocabulary is smaller than it looks: 0 = always show a
digit (pad if needed), # = show if present, , = thousands
separator, . = decimal point, "text" = literal text,
[Red]/[Blue] = colour, @ = the text value. That’s most of
the language.
The recipes worth stealing
Units without sin. 0.0" kg" displays 2.3 kg while the
cell holds 2.3 — still summable, still
chartable. Typing
2.3 kg as text is the beginner version; it looks the same and
breaks every calculation.
The format is how you get both.
Thousands and millions, honestly. A trailing comma divides
the display by a thousand: #,##0, shows 48,213,062 as
48,213; #,##0,,"M" shows it as 48M. The value never moves
— the honest big-figures trick from
the first formats lesson,
now yours to write.
Padded IDs. 00000 displays 42 as 00042 — the answer to
lost leading zeros when the values are genuinely numbers. (IDs
that should never be arithmetic at all belong as
text from import;
this recipe is for counters you compute.)
Dates with a day name. ddd dd mmm → Wed 16 Jul;
mmmm yyyy → July 2026. Every date column in a
print-ready report
deserves a deliberate date costume rather than the default.
Hiding, carefully. ;;; (three semicolons, nothing else)
displays nothing at all — the cell looks empty while holding its
value. Occasionally right (a
helper flag
that only conditional formatting
reads); mostly a trap for the next reader — prefer a hidden
column, which at least announces itself.
The boundaries
Three, honestly held. Conditions beyond colour belong to
conditional formatting — the language allows [>1000]-style
tests, but rules written in
Manage Rules
are visible and maintainable; format-string logic is a message
in a bottle. Text-heavy displays belong to formulas — if the
costume needs TEXT()-level gymnastics, build the display
string in its own column
and keep the value pure beside it. And the reader outranks the
tailor: a format that makes a colleague ask “is that
thousands?” failed, however clever —
chart-title rules apply
to number costumes too. Label the units somewhere the eye
lands.
Four sections, a dozen symbols, five recipes. The costume department turns out to have a workshop — and every stitch of it obeys the first law you learned: the value underneath never moves.