Does numbers spreadsheet work with google docs

Example of multiple-selection drop-down chips in Google Sheets

Mastering Multiple-Selection Drop-Down Chips in Google Sheets

Select items based on chosen categories

Multiple-Selection Dependent Drop-Downs in Google Sheets

Create a Dynamic Fibonacci Sequence in Google Sheets

How to Generate Random Groups in Google Sheets

Automatically Pre-fill Google Forms from Google Sheets: A Step-by-Step Guide

Automatically Pre-fill Google Forms from Google Sheets: A Step-by-Step Guide

How to Set Up Google Docs Forms: A Comprehensive Guide

How to Insert Drop-downs in Google Docs Documents

How to Create a Table and Pin and Unpin Header Rows…

Docs Section Break - Margin, Header/Footer, and Page Numbering

How to Use Section Break in Google Docs

google docs doc writer table

How to Split a Table in Google Docs

How to Create First Line Indent and Hanging Indent in Google…

Duplicating Rows Based on Cell Values in a Column in Excel

How to Duplicate Rows Dynamically Based on Cell Values in Excel

Remove duplicates by section in a column

Unique List by Section in Excel

Combination of REDUCE and HSTACK functions in Excel

REDUCE Function in Excel: Transform Arrays with Ease

Inserting Blank Rows After Each Category

Insert a Blank Row After Each Category Change in Excel

Excel Formula to Extract All Rows Between Two Texts in a…

Days Between Weekday Names in Excel and Google Sheets

Display Month Names Only at Month Start (Excel & Google Sheets)

SUMIFS with XLOOKUP in Excel and Google Sheets

Counting XLOOKUP Results with COUNTIFS in Excel and Google Sheets

SORT and SORTBY – Excel Vs Google Sheets

Format Numbers To Millions and Thousands in Google Sheets

October 26, 2023 Modified date: October 26, 2023

When dealing with large numbers in financial data, you may want to format numbers in either thousands, millions, or a combination of both. Custom number formatting is the best way to achieve this in Google Sheets.

However, this approach has its limitations as it applies to predefined cell ranges. But what about the output of a formula that may increase in size both horizontally and vertically over time?

You might consider using CHOOSECOLS or INDEX to extract columns from the formula result and apply text formatting.

While this approach may work to some extent, it’s important to note that it converts numbers to text. Additionally, you might need some expertise to extract columns from a multi-column output, format them, and stack them.

As a result of formatting to text, you may encounter issues when using the processed data in further calculations.

However, this doesn’t mean that there is only one option to format numbers in thousands or millions in Google Sheets without altering the underlying value.

You can use the QUERY function, similar to the TEXT function, to format numbers while retaining the underlying value in number format.

Formatting numbers in millions or thousands in charts is also possible.

Formatting Numbers to Thousands (K) in Google Sheets

We will begin with the Custom number format, which is the preferred method for formatting numbers into thousands or millions in Google Sheets.

In custom number formats, # and 0 serve as number placeholders and a comma is used as the thousand separator. In this, # represents a digit (0-9) that will be displayed if there is a non-zero digit in that place value, while 0 represents a digit that will always be displayed, even if it’s zero.

If you omit any placeholder after the thousand separator, the number will be abbreviated to thousands.

Please refer to the table below to select the appropriate format string for formatting numbers into thousands (K) in Google Sheets.

Steps: Custom Number Formatting to Format Numbers To Thousands

The numbers in the selected cells are now formatted in thousands with the number format #,##0,"K" . Here is a screenshot of the result.

Result: Custom Number Formatting to Format Numbers To Thousands

Please note that there have been no changes in the underlying value of the cells.

Using Formulas

We can use QUERY or the TEXT function to format numbers into thousands in Google Sheets.

When using the TEXT function, it returns the numbers in text format, while the QUERY function retains the underlying values as numbers.

Which one should you choose?

So, if you prefer not to use the Custom Number Format due to flexibility issues, you can use either the TEXT or QUERY functions.

The difference lies in the underlying values in the result cells. The TEXT function returns text values, whereas the QUERY function preserves the original numbers.

Therefore, I would recommend using the QUERY function to format numbers into thousands if you prefer a formula over the Custom number format.

Scroll up and select the format string from Table #1 that suits your needs. Below is an example of how to use the number formatting in these functions.

Using QUERY and TEXT Functions to Convert Numbers to Thousands

TEXT Formula (for the range B2:B13):

=ArrayFormula(TEXT(D2:D13,"#,##0.0,K"))

QUERY Formula (for the range B2:B13):

=QUERY(D2:D13,"select D format D '#,##0.0,K'")

Points to Note:

  1. In both functions, you must remove the double quotes around K in the format string.
  2. In the TEXT function, the format string must be placed within double quotes, whereas in QUERY, it should be within single quotes.

Formatting Numbers to Millions (M) in Google Sheets

Please refer to the table below to select the appropriate format string for formatting numbers into millions (M) in Google Sheets.

Format Numbers to Millions

Using Formulas

We can use the TEXT function or the QUERY function to format numbers into millions in Google Sheets. However, when using these formulas, simply copy-pasting the format string won’t work; you need to make a few changes. Here they are:

In both functions, you must remove the double quotes around M .

The letter M won’t work, as it might be interpreted as a time component. Instead, you should replace it with an alternative letter, Μ , which you can obtain by inserting the following CHAR formula in any blank cell: =CHAR(924)

In the TEXT function, the custom number format must be placed within double quotes, whereas in QUERY, it should be within single quotes.

Here are examples of using the TEXT and QUERY functions to display the numbers in cells B1:B5 in millions.

TEXT Formula (for the range B1:B5):

=ArrayFormula(TEXT(B1:B5,"#,##0.0,,Μ"))

QUERY Formula (for the range B1:B5):

=QUERY(B1:B5,"select B format B '#,##0.0,,Μ'")

Results of QUERY and TEXT formulas

Please note that the TEXT function returns text, whereas the QUERY function returns numbers.

Dynamic Formatting Numbers to Millions and Thousands in Google Sheets

It’s impractical to apply the numbers-to-thousands or numbers-to-millions format mentioned above to a range of cells when there is a significant difference between two numbers. For example, formatting 10,000 to millions may result in 0.0M. To address this, we may need to conditionally format the numbers:

Numbers below 1,000,000 in thousands and those above in millions. This is achievable in Google Sheets using both Custom number format and TEXT/QUERY formulas.

Note: Since we apply conditions, 0 and negative numbers won’t be converted. They will retain their original format and be highlighted in red.

Here is the format string to dynamically convert number formatting to thousands or millions in Google Sheets.

[>=1000000] #,##0.0,,"M";[>0] #,##0.0,"K";[Red]General

You can apply it to the selected range as follows:

To apply to the range A1:A5, follow these steps:

Conditional Number Formatting in Google Sheets

  1. Select the range A1:A5.
  2. Click on Format > Number > Custom number format.
  3. Copy and paste the provided format string into the field.
  4. Click Apply.”

Here are the corresponding formula options.

=ArrayFormula(TEXT(A1:A5,"[>=1000000] 0.0,,Μ;[>0] 0.0,K;General"))
=QUERY(A1:A5,"Select A format A '[>=1000000] 0.0,,Μ;[>0] 0.0,K;General'")

Example: QUERY Formatting Clause

Formatting Numbers to Millions or Thousands in Charts

We can format numbers in thousands or millions for chart axis labels or data point labels. This can help reduce the space required for labeling within the chart.

The easiest way to format numbers in millions or thousands in a Google Sheets chart is as follows:

Double-click on the axis or data point labels. Here, I’ll start by changing the number format of the vertical axis.

Sample Chart

Under “Number format,” click the dropdown and select “Other custom formats.”

Copy and paste one of the format strings from the tables above, then click “Apply.”

Next, double-click on the data point labels.

Select the custom number format as before and paste the copied format string.

Vertical Axis and Data Point Labels After Formatting

In the above chart, I’ve only enabled data point labels for one series. If you have two series, you will need to repeat the number formatting for both separately.

That’s all. Thank you for reading. Enjoy.

Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.