NumberFormats – CellsAtWork https://tools.cellsatwork.com Excel Tools for Equity Professionals Wed, 29 Jan 2020 23:57:29 +0000 en-US hourly 1 https://wordpress.org/?v=5.3.15 Useful number format for stock prices in Asia https://tools.cellsatwork.com/useful-number-format-for-stock-prices-in-asia/?utm_source=rss&utm_medium=rss&utm_campaign=useful-number-format-for-stock-prices-in-asia Sat, 30 Nov 2019 23:32:00 +0000 http://tools.cellsatwork.com/?p=100

Imagine you need a number format to display stock prices from different countries so that they are easily readable. Some countries such as Singapore have stock prices to 2 decimal places, e.g. Singapore Airlines (S$10.77), or 3 decimal places, e.g. Starhill Global REIT (S$0.695), while others such as Korea have stock prices in the thousands with no decimal places, e.g. Samsung Electronics (KRW 2,581,000). The table below shows what you want:

A useful custom number format that you can use is: 

[>1000]#,###;[>=2]#,##0.000;0.00

Essentially, this number format says that:

– if the number is at least 1000, it will be displayed with no decimal places, with a comma as a thousands separator; 

– if the number is between 2 to 1000 inclusive, it will be displayed with 3 decimal places;

– the rest of the numbers (i.e. those less than 2) will be displayed with 2 decimal places.

This should work for the majority of share prices, though there would be some exceptions that will not be displayed to the desirable state, especially with US share prices, e.g. Amazon (US$ 1,508.95 will be displayed as US$1,509.)

For an overview of how custom number formats work, click here.

]]>
Overview of Custom Number Formats https://tools.cellsatwork.com/overview-of-custom-number-formats/?utm_source=rss&utm_medium=rss&utm_campaign=overview-of-custom-number-formats Mon, 30 Sep 2019 23:12:00 +0000 http://tools.cellsatwork.com/?p=59 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

]]>
Shorten Big Numbers with K or M https://tools.cellsatwork.com/excel-shorten-big-numbers-with-k-or-m/?utm_source=rss&utm_medium=rss&utm_campaign=excel-shorten-big-numbers-with-k-or-m Sat, 31 Aug 2019 10:03:00 +0000 http://tools.cellsatwork.com/?p=32 When we have large numbers, we often want to use the contraction "K" or "M" for thousands or millions respectively. To do this in Excel, we need to change the number format to the following.

For thousands (and 2 decimal places): [where 1,234 is shown as 1.23K]

0.00,"K"

For millions (and 2 decimal places): [where 1,234,567 is shown as 1.23M]

0.00,,"M"

One good use of number formats is in charts, as seen below. This uses the following format in the data labels:

0.00,,"M"

If you want to combine the thousands and millions format, you can use the conditional number format below. Numbers greater than 1 million are shown with an "M", and numbers greater than 1 thousand are shown with a "K".

[>=1000000]0,,"M";[>=1000]0,"K";0

For an overview of how custom number formats work, click here.

]]>