Custom Number Format in Google Sheets

What Is Custom Number Format in Google Sheets?

Custom number format in Google Sheets allows you to control the way numbers or any information are formatted. Here, the data does not change; only the way it is visualized is changed. This technique is very useful as it allows you to add visual effects to your data in a way that suits the users. There are many existing built-in formats in Google Sheets, but we can create a unique format according to requirements.

In the example below, we have formatted our numbers. Have a look at how they are displayed before and after formatting.

Custom-Number-Format-in-Google-Sheets-Definition
Key Takeaways
  1. A custom number format in Google Sheets allows you to display numbers and text in a specific way without altering the value in the cell.
  2. To access custom number formats, select the cells, and go to Format > Number > Custom number format.
  3. In custom number formats in Google Sheets, you can use a variety of symbols to control how the data is displayed.
  4. For example, # represents a digit, and 0 will display extra zeros if necessary. Here, 000 displays 4 as 004.
  5. To revert to the default format, select the cells, go to Format > Number, and choose Automatic.

How to Custom Format Numbers in Google Sheets?

We can custom format numbers as shown below.

Access custom number format through the Google tab.

Let us look at how to format a set of numbers through the menu bar.

Step 1: Go to the following:

Format -> Number-> Custom number format

How-to-Custom-Format-Numbers-in-Google-Sheets-Step-1

Step 2: Choose any of the desired formats. Click Apply. The box highlighted below shows a sample of how your numbers will be displayed. This is the input box that gives a preview of what the rule does. You get an accurate indication of how the numbers will look when applied.

How-to-Custom-Format-Numbers-in-Google-Sheets-Step-2
How-to-Custom-Format-Numbers-in-Google-Sheets-Step-2-1

The format is applied to your numbers.

How-to-Custom-Format-Numbers-in-Google-Sheets-Step-2-2

Another way is through the toolbar in Google Sheets.

Google Sheets Custom Number Format Structure

Now, let us see what these custom number formats represent. The custom number format is made up of four separate formatting sections. These are for different number types and for text. The four sections are:

  1. Positive numbers
  2. Negative numbers
  3. Zero
  4. Text

Let us look at them one by one. A semi-colon separates each section.

#,##0.00 ; [red](#,##0.00) ; 0.00 ; “some text “@

Google-Sheets-Custom-Number-Format-Structure

#1 – Format for positive numbers

Format-for-positive-numbers

Let us now look at the format for positive numbers. The first rule, which is before the first semicolon, shows how the positive numbers will be displayed.

#2 – Format for negative numbers

The second rule is between the first and second semi-colons. Here, we get to see how the negative numbers will be displayed.  tells Google Sheets how to display negative numbers.

#3 – Format for zeros

The third rule is how to format zeros. It is between the second and third semi-colons and clearly shows how zeros will be displayed.

#4 – Format for text

The fourth rule, which comes last, tells Google Sheets how to display all the text values.

Top 5 Symbols/Rules for Custom Number Format in Google Sheets

Given below are the top 5 symbols.

0 (Zero Digit)

It is used to show a number. If there is no number in that position, it will return a zero.

For example, 0.0 00.00

Before formatAfter format  
22.0
202.00

, (Comma)

It is used to add a comma in a specified position. You can combine Google Sheets number format comma with either K or M, which turns 2000 into 2K and 10000000 into 10M.

For example, with 1000

Before formatAfter format  
20002,000
20002K

# (Pound Sign)

This sign acts as a placeholder for a digit. If no digit is present, nothing will be shown. If your number is bigger than the number of #s, you can only view the number of digits specified by #.

For example, with #.## or ##.##,

Before formatAfter format  
2.34 #.#2.3
42.123 ##.##42.12

. (Period)

It adds a decimal point to your number.

For example, #,#

Before formatAfter format  
23 ##.##23.00

% (Percentage)

This is used to format a number as a percentage.
For example, ##,# %

Before formatAfter format  
2424.0%

Additional Symbols/Rules for Custom Number Format in Google Sheets

/ (Forward Slash)

It is used to format a number like a fraction.

For example, #?/? means 10.5 -> 21/2

* (Asterisk)

An asterisk repeats whichever symbol immediately follows it to fill the width of the cell.

For example, *-0 means 100 is represented as ——————100

E (The Letter E)

It is used to format a number as an exponent. They are used in conjunction with the plus or minus sign. You can use both upper- and lower-case.

For example,

             0.0E+0                   100000001.0E+7
              0.0E-0     0.00000011.0E-7

? (Question Mark)

The question mark aligns values by adding necessary space, even when the number of digits doesn’t match. It helps align decimals if your numbers have different decimal lengths.

() Parentheses

You can add parentheses around numbers to change the format.

For example,

#,##; (###)         -100 → (100)

_ (Underscore)

It adds space to your number formats. Here, the character following the underscore determines the size of space to be added. For example,

#,##0.00_);(#,##0.00) 1234.56    1,234.56

#,##0.00_);(#,##0.00) -1234.56  (1,234.56)

Conditional Rules for Custom Number Format in Google Sheets

When you add conditions inside the square brackets, the specified conditional expressions replace the default positive, negative, and zero rules.

For example:

RuleBeforeAfter
[<10]”Small” ; [>20]”Large” ; “Medium”8Small
12Medium
25Large
  • Please note that conditions can only be specified in the first two rules.
  • The third rule is used when the first two conditions are not satisfied.
  • The fourth rule is for text and can’t be used for conditional formatting.
  • If a number matches more than one rule, it shows the first format that matches.

Color Rules for Custom Number Format in Google Sheets

You can add color to the rules with square brackets [ ].

The colors which can be used are:

[black], [white], [red], [blue], [green], [yellow], [cyan], [magenta]

To get more colors, use “Color #” where a number between 1-56 replaces #.

[Color1], [Color2], [Color3], …, [Color56]

For example, for using Red, [Red]#,###, we get 1,000

For blue, [Blue]#,###, we get 2,000

Examples

Example #1 – Custom Format Phone Numbers

Custom formatting phone numbers in Google Sheets helps you present the data consistently. Let’s look at an example of how to do it.

Let us try to display some numbers in the US Phone Number Format

Step 1: Given below are some phone numbers we have entered.

Example-1-Step-1

Step 2: Select the cells with the phone numbers. Go to FormatNumberCustom number format.

Example-1-Step-2

Step 3: Enter the following format:

(###) ###-####

This is the American number format. Click Apply.

Example-1-Step-3

You can observe how the display of the numbers is changed.

Example-1-Step-3-1

Always ensure that the phone numbers are stored as plain text or numbers.

Example #2 – Conditional + Color Custom Format

We have a set of temperatures of different cities. Let us apply conditional formatting for certain temperatures along with Color Custom format.

Custom-Number-Format-in-Google-Sheets-Example-2

Step 1: Let’s try applying conditional formatting to temperatures below 25. To do this, go to Format – Conditional formatting.

Example-2-Step-1

Step 2: In the Conditional format rules pane which opens on the right, choose the Format Rules as Format Cells If “Less Than.”

Example-2-Step-2

Step 3: Enter 25, choose a color of your choice, and click Done.

Example-2-Step-3

You can observe the change in the colors according to the formatting condition we have set.

Example-2-Step-3-1

Now, to apply Custom Number Format, let us apply all negative numbers in white with brackets.

Step 4: Go to FormatNumberCustom number format. Here, enters the following format in the Input box.

###0_);[White](###0)

Example-2-Step-4

Step 5: Click Apply to see the changes.

Example-2-Step-5

Important Things to Note

  1. There is no particular limit on the number of custom formats you can add, but remember, too many will lead to confusion.
  2. You can apply conditional formatting and custom number formats to display values based on different conditions in the style you require.
  3. You can create custom formats for dates and times as well.
  4. Adding Custom Number Format in Google Sheets can significantly improve the consistency and readability of your model.

Frequently Asked Questions (FAQs)

1. What are some of the important symbols used in custom number formats?

Some of the most important symbols include:
1. #: This is the placeholder for a digit. #.## displays 3.4 as 3.40
2. 0: It is the placeholder for a digit that will display extra zeros. #.000 displays 3.4 as 3.400
3. .: This adds a decimal point to your number. #.# displays 3 as 3.0
4. ,: It is like a separator added to numbers in specified positions. #,#00 displays 3400 as 3,400
5. @: It is a placeholder for text. It means “don’t change the text that is entered. 0;@ means Hi is displayed as Hi.

2. What are the different ways to format negative numbers?

You can format negative numbers using a format like:
0;[Red]-0;0
Here, positive numbers are displayed as usual, negative numbers in red, and zero will be displayed as 0.
Another way to format negative number is by adding braces.
#0_);(#0)
formats negative numbers with braces. -4 becomes (4).

3. What are some of the rules in Custom Number Format in Google Sheets?

If you have specified only positive number formatting, then it is applied to negative and zero values, too. Text will display as it is.
If you specify only positive and negative number formatting, all zeros take on the positive value format. The text will be the same.
All number values will display as specified when you specify positive, negative, and zero number formatting.

Download Template

This article must help understand Custom Number Format in Google Sheets with its features and examples. You can download the template here to use it instantly.

Recommended Articles

Guide to What Is Custom Number Format in Google Sheets. We learn syntax & how to use Custom Number Format in Google Sheets, examples, working template. You can learn more from the following articles.-

GOOGLEFINANCE in Google Sheets

Formula Parse Error in Google Sheets

PI in Google Sheets

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

CHATGPT & AI FOR MICROSOFT EXCEL COURSE - Today Only: 60% + 20% OFF! 🚀

X