Excel Guides

Understanding Number Formatting Codes in Excel

Excel uses a variety of number formatting codes to control how numeric values are displayed in cells. These codes can be used to format values as currency, percentages, decimals, or exponential notation. In addition, Excel provides special codes for fractions, dates, and times.

The following table lists the most common number formatting codes:

CodeDescription
#A digit placeholder. If the value in the cell is 1234, the format code "#" will display 1234.
0A zero placeholder. If the value in the cell is 1234, the format code "0" will display 1234.
,A comma placeholder. This code inserts a comma into the formatted value for every thousand place. For example, if the cell value is 1234567, the format code "#,##0" will display 1,234,567.
. (period with a space)A decimal point placeholder. This code inserts a decimal point into the formatted value. For example, if the cell value is 1234, the format code "#.0" will display 1234.0.
: (colon with a space)A time separator placeholder. This code inserts a colon between hours, minutes, and seconds in time values. For example, if the cell value is 0:45:23 (12:45 AM), the format code "h:mm:ss" will display 0:45:23.
"$"(dollar sign)
This code precedes a number with a dollar sign. For example, if the cell value is 1234, the format code .00 will display $1234.00.

Move beyond 

Excel

Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.