30 Sep 2019

Overview of Custom Number Formats

A number format can have up to 4 sections, separated by semi-colons. In general, what each section applies to depends on the number of sections in total.

1 section: All numerical values

2 sections: Non-negative numbers; negative numbers

3 sections: Positive numbers; negative numbers; zero values

4 sections: Positive numbers; negative numbers; zero values; text

Conditional Formats
However, if the custom number format has conditional formatting, the above does not apply. A number format can have up to 2 conditions, with the last section reserved for text formatting and the 2nd last section reserved for other numbers that do not meet the conditions.

Conditions are included in square brackets and the following formatting will be applied if the condition is true. If there are 2 conditions in the number format, the 2nd condition will only be considered if the 1st condition is not true, so the ordering of the conditions is important.

Number formats can be used in cells, charts (e.g. for any axis or data labels) or in formulas using the TEXT formula.

Here are some examples of how conditional or custom formats can be useful:

Useful number format for stock prices in Asia

Shorten Big Numbers with K or M

If you want to learn more about number formats, here are some useful resources on Custom Number Formats & Conditional Number Formatting:

(1) This site describes the basics of number formatting – how sections are split if you have 1, 2, 3 or 4 sections, custom formats for numbers, text, date, time & miscellaneous.
https://www.sumproduct.com/thought/number-formatting

(2) This site covers some useful applications of custom number formats (thousands separators, colours, decimal places, dates, times, etc.)
https://peltiertech.com/Excel/NumberFormats.html