You are on page 1of 17

Excellence with Excel 3.

0
Custom Number Formats: Best Practices in Models

Custom Number Formats: Best Practices in Financial Models

Custom number formats are one of the most powerful tools in Excel. They are more relevant to
financial models than data analysis, but they can be useful in both.

There’s a lesson dedicated to custom number formats, so this guide sums up everything there, explains
more about the syntax of custom number formats, and demonstrates how to use them in other
contexts.

Table of Contents

CUSTOM NUMBER FORMATS: BEST PRACTICES IN FINANCIAL MODELS 1

The Most Common Uses for Custom Number Formats 2


Valuation Multiples 2
Aligned Positive and Negative Percentages with Parentheses 3
Dates in Input Boxes and Headers 6
Axes and Data Labels in Graphs and Charts 7
Words of Wisdom and Caution with Custom Number Formats 9

The Syntax for Custom Number Formats 10


Custom Number Formats: One Example to Rule Them All 14
Conditional Number Formats 16

1 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

The Most Common Uses for Custom Number Formats

The most common use cases in financial models are for valuation multiples, such as the Price-to-
Earnings, or P / E, multiple, and for percentages, dates, and axes and data labels in graphs.

Custom number formats make these numbers easier to read by formatting positives, negatives, 0’s,
and text differently.

They also let you change the alignment, add characters, scale numbers up and down, and use different
colors for numbers in different ranges.

Valuation Multiples

You calculate valuation multiples, such as Enterprise Value / EBITDA, Enterprise Value / Revenue, and P
/ E, all the time when valuing companies and building financial models.

If you displayed these multiples as normal numbers, such as “11.1” or “5.7,” it would not be clear that
they represent valuation multiples.

So, we use the custom number format below (or variations):

The first 0 forces the display of at least one digit before the decimal so that a multiple such as 0.4 x
appears as 0.4 x rather than .4 x.

2 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

The .0 part forces the display of one digit after the decimal so that a multiple such as 2.0 x appears as
2.0 x rather than 2 x.

And the x part at the end puts the “x” character after the number and the space.

You could take this format a step further by formatting negative valuation multiples differently, such
as by changing the color to red and adding parentheses around them to indicate a negative:

The semicolon tells Excel that we’re done with the format for positive numbers and that the next part
will be for negative numbers.

[Red] changes the font color to red, and the single set of parentheses puts () around the number when
it’s negative. The 0.0 x part works in the same way as above.

Return to Top.

Aligned Positive and Negative Percentages with Parentheses

The built-in percentage formats in Excel leave something to be desired: they do not format negative
percentages with parentheses, they don’t properly align positive and negative percentages, and they
do not display any decimal places.

To fix those problems, we use the following custom number format for percentages:

3 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

The semicolons here separate the formats for positives, negatives, 0’s, and text, in that order.

The first part, for positive percentages, is:

_(0.0%_)

The 0.0% part forces one digit before the decimal and one digit after the decimal, so that 0.7% appears
as 0.7% rather than .7%, and so that 2.0% appears as 2.0% instead of 2.%.

The % part after the 0.0 displays the “%” character.

The parentheses here work differently from the ones in the valuation multiple example above
because these are preceded by _, the underline character.

The _ character tells Excel, “Please insert a space here that is the same width as the next character.”

The next character is the ( for the first _, and the next character is the ) for the second _.

Therefore, the _( inserts a blank space the same size as ( and the _) inserts a blank space the same
size as the ).

Negative percentages always have these ( and ) characters around them, but positives, 0’s, and text do
not – so, these extra spaces ensure everything will be aligned with negative percentages.

The second part, for negative percentages, is:

4 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

(0.0%)

Since there are no _ characters here, these percentages display like they normally would, and the 0.0%
forces a digit before the decimal and one after the decimal, along with a % at the end.

The third part, for 0’s, is:

_("–"_)_%

Again, the _( and _) parts create blank spaces that are the same width as the parentheses.

The "–" part displays the dash character when the percentage is 0. We need double quotes to tell Excel
to display the dash as pure text and not to interpret it or do anything different.

The _% part at the end displays another blank space, this time the same width as the % character. This
part ensures alignment with positive or negative percentages, which always have the % at the end.

Finally, the fourth part, for text, is:

_(@_)_%

The _( and _) and _% add blank spaces of the appropriate sizes, as described above.

The @ tells Excel, “Display whatever text is in this cell.” So, if the user enters “abc” in the cell, the @
will display “abc”. There will be one blank space before the “abc” and two blank spaces after it.

This screenshot summarizes the effects of the _( and _) parts:

With the version that uses our custom number format, the “%” characters are in the same spot, and
there’s an extra blank space at the end of the positive 5.5%.

Return to Top.

5 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

Dates in Input Boxes and Headers

The default date format in Excel is not ideal because it’s linked to your system and region settings. This
creates ambiguity because different regions display the date differently.

For example, a date like “December 5th, 2020” would be shown this way in the U.S.:

12/5/2020

But in the U.K., it would be shown this way:

5/12/2020

To avoid confusion, we use the international date format, or YYYY-MM-DD, for input boxes with dates:

The yyyy part ensures that the year will appear with all 4 digits, the mm part displays the month with 2
digits, and the dd part displays the day with 2 digits.

The dashes in between display the – in between all those.

We do not need to specify formats for negatives, 0’s, or text because dates cannot be negative, 0, or
text.

6 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

In headers and sub-headers, it’s cumbersome to display the entire date formatted this way, so we
shorten it with a format such as “FY”yy:

This displays the “FY” text and then the year with 2 digits. Again, we don’t need to specify the format
for negatives, 0’s, or text.

Return to Top.

Axes and Data Labels in Graphs and Charts

When you create a chart, small numbers and percentages tend to show up correctly because Excel is
fairly good at detecting and formatting those. It’s less effective with formatting large numbers:

This chart is far too crowded because the numbers used for Revenue contain 3 places after the comma.

7 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

You can fix this by scaling down the numbers directly within the custom number formats.

To do this, right-click the axis and data labels and go to “Format Axis” or “Format Data Series,” or click
the axis or data labels and then press Ctrl + 1 (PC) or ⌘ + 1 (Mac).

You can then use the following custom number format to fix this problem:

How it works: A comma character (“,”) after the 0 divides the number by 1,000.

8 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

By entering “0,” we’re telling Excel: “Even if there’s nothing there, please display at least one digit, and
then divide the whole number by 1,000 and display that.”

The “ \B” part at the end adds a space and then displays “B” as the abbreviation for “Billions.”

If you enter “0,,” instead, you would divide the number by 1 million rather than 1,000.

Return to Top.

Words of Wisdom and Caution with Custom Number Formats

Custom number formats can be very powerful, but you should not overuse them.

You might be tempted to add complex conditions, colors, spacing, alignment, scaling, and other
features, but very few people understand the syntax beyond the basics.

Simple formats, such as the “FY”yy one above, tend to be far more useful and effective.

There’s no way to tell at a glance if a cell is using a custom number format, so you must go into the
Format Cells dialog box and investigate for yourself.

Using too many custom number formats can also create stability problems in Excel, and if you go too
far, Excel might accidentally delete the new formats you introduced or “un-format” numeric cells.

Finally, do not re-invent the wheel by replicating a built-in number format with a custom one that you
create.

Excel already offers dozens of built-in number formats; you should create a new one only if it’s
absolutely necessary.

The best reason to create a new number format is usually when you’re working in an industry with
specific measurement units, and you want to display these units at the end of numbers.

For example, if you’re working with Barrels of Oil for oil & gas companies, you might build text such as
“Bbl” (the abbreviation for “Barrels of Oil”) into certain number formats there.

Return to Top.

9 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

The Syntax for Custom Number Formats

A single example of custom number format syntax that uses most of the key features is:

Example Data: Displayed As: Used For:


5 5.0 x Valuation Multiples
-1200 (1,200.00) Negative Expenses
0 Balanced! Balance Sheet Checks
Walmart Model – Walmart Titles & Headers

Text on the Left: [Blue]0.0 x;[Red](#,##0.00);"Balanced!";"Model - "@

1. The order for Custom Number Formats is: [Positive Style];


[Negative Style]; [Zero Style]; [Text Style]

2. If you include the “@” symbol and text, the text will appear,
and the “@” will be replaced by what’s in the cell.

3. [Red] and [Blue] (and other colors) can be used for color-
coding.

Here’s a quick summary of characters that show up “as is” in custom number formats:

10 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

Then there are interpreted characters, which Excel may replace and display differently based on the
cell contents:

If you want to display these interpreted characters as themselves, you must put a backslash before
them (e.g., “\*0” would produce *100 in Excel if you enter a hard-coded 100 in the cell).

Here are examples of different numbers formatted in styles using the interpreted characters above:

11 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

And here are a few examples of the # and 0 characters together:

The decimal separator is straightforward, and you rarely use the “?” character in financial models, so
we’re not covering it here.

The next useful characters are the comma, asterisk, and underline. We’ll start with the comma:

In the first column above, the “,” tells Excel that we want to display comma separators between
thousands in the number – because the comma appears after the “#” character.

12 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

But in the next two columns, the “,” divides numbers by 1,000 because it appears right after the “0”
character.

The asterisk character, or *, is used to “fill” a cell with the character that immediately follows it until
the entire cell is filled.

This one is usually used to ensure alignment with currency symbols in financial models so that the
symbol always appears on the left edge of the cell:

Since a blank space follows the * character, the currency symbol is displayed on the left-hand side, and
then blank spaces are displayed until the cell is filled to its width. Then, we display a number with a
forced digit before the decimal and two forced digits after.

The underscore, or _, character, is used to align positive and negative numbers and percentages when
the negatives have parentheses:

The _ character inserts a blank space the width of the character immediately after it.

In the second example in this quick reference guide, we used it to create a similar custom number
format for percentages that also properly aligns 0’s and text.

13 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

Finally, there are many formatting codes for dates and times, some of which we discussed above.

Let’s say that we have a date of December 5, 2020 with a time of 6:35:07 AM. Here’s what it looks like
when formatted with different date and time codes:

You can then use these codes together to create custom number formats, as in the example above
with yyyy-mm-dd.

Return to Top.

Custom Number Formats: One Example to Rule Them All

To tie together all the concepts, it’s helpful to look at the syntax that Excel uses internally for its
Accounting number format (we modified it slightly by removing decimal places):

14 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

The format reads:

_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)

Starting with the first part, for positive numbers, here’s what each element does:

• _( – This adds a blank space the size of the ( in front of any positive number.

• $* – This adds a $ after the blank space and then repeats blank spaces until the cell is filled,
ensuring that $ always appears on the left edge.

• #,##0 – This forces at least one digit to display, even if it’s a number like 0.1, and it displays a
comma for the thousands separator (if the number is big enough).

• _) – This adds another blank space the size of the ) at the end of any positive number.

And then in the next part, for negative numbers:

• _( – This adds a blank space the size of the ( in front of any negative number.

• $* – This adds a $ sign after the blank space and then repeats blank spaces until the cell is filled,
ensuring that $ always appears on the left edge.

• (#,##0) – This displays negative numbers with parentheses around them, and it forces at least
one digit to display; there’s a comma for the thousands separator, if required.

And then for the next part, which corresponds to 0’s:

• _( – This adds a blank space the size of the ( in front of any 0.

• $* – This adds a $ sign after the blank space and then repeats blank spaces until the cell is filled,
ensuring that $ always appears on the left edge.

• "-" – This displays a dash on the right side of the cell to indicate a 0.

• _) – This adds another blank space the size of the ) at the end of any 0. It will appear right after
the dash above.

And finally, for the text component:

15 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

• _( – This adds a blank space the size of the ( in front of any text.

• @ – This displays the text entered or linked to in the cell.

• _) – This adds another blank space the size of the ) at the back of any text.

Return to Top.

Conditional Number Formats

One more “bonus feature”: you can also create conditional custom number formats in Excel.

These allow you to modify the built-in behavior for the semicolons that separate positives, negatives,
0’s, and text, and make them separate different numbers instead.

For example, you could display valuation multiples above 100x in red, multiples between 10x and 100x
in black, those between 0x and 10x in blue, and negative multiples in purple.

By doing this, however, you lose the original, built-in structure for custom number formats.

There’s no way to “undo” this change unless you delete the format and start over, so be careful.

To set this up, you can use the same operators that you use in normal functions and formulas: =, <>, <,
<=, >, >=, and so on.

Here are a few examples:

16 of 17 https://breakingintowallstreet.com
Excellence with Excel 3.0
Custom Number Formats: Best Practices in Models

There is rarely a reason to create extremely complex conditional number formats.

Once you reach a certain level of complexity, you should use conditional formatting instead, since it’s
more flexible and easier to use.

Return to Top.

17 of 17 https://breakingintowallstreet.com

You might also like