To apply a custom number format to your spreadsheet:
- On your computer, open a spreadsheet in Google Sheets.
- Highlight the data you want to format.
- Click Format
Number.
- Click Custom number format.
- Search in the menu text box to select a format. You can also add your own custom number format into the text box.
- Click Apply.
When creating a custom format, note that the formatting can consist of up to 4 parts separated by semicolons: positive;negative;zero;non-numeric. Financial formats are also supported.
You can use colors in the formatting, for example to differentiate between positive and negative numbers, by adding a color in brackets (for example, [Red]) anywhere within the desired part of the format. Formatting colors must be used in English. The colors that can be used are:
Here is a list of common syntax characters that can be used to create a custom number format:
Character |
Description |
0 |
A digit in the number. An insignificant 0 will appear in the results. |
# |
A digit in the number. An insignificant 0 will not appear in the results. |
? |
A digit in the number. An insignificant 0 will appear as a space in the results. |
$ |
Formats numbers as a dollar value. |
.(period) |
Formats numbers with a decimal separator.
- The spreadsheet locale determines which character is used as the decimal separator for all numeric values.
- When you press the decimal key on a numeric keypad, the spreadsheet locale also determines the character inserted.
|
,(comma) |
Formats numbers with a thousands separator. |
/ |
Formats numbers as a fraction. |
% |
Formats numbers as a percent |
E |
Formats numbers as an exponent. |
"text" |
Adds text to the formula. Insert the desired text within quotations for it to appear. |
@ |
Displays text entered into a cell.
|
* |
Repeats the following character to fill in the remaining space in the cell.
|
_ (underscore) |
Adds a space equal in width to the following character.
|