Google Sheets FLATTEN Function: Syntax, Examples & Tips

The FLATTEN function converts a range or array into a single column, combining all values into one vertical list.
Google Sheets
FLATTEN(range1,[range2,...])

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is the FLATTEN Function?
  3. A Practical Example
  4. FLATTEN Formula
  5. Result of the Formula
  6. Why Use FLATTEN?
  7. Key Takeaways:
  8. Example use case

Parameters

range1:
The first range of cells that you want to flatten into a single column.

range2:
An optional additional range of cells that you want to include in the flattening process. You can include multiple ranges separated by commas.

What is the FLATTEN Function?

The FLATTEN function in Google Sheets is a useful tool that allows you to convert a range or array of values into a single column. This function is particularly helpful when you want to simplify data presentation or when you need to work with data in a linear format. By flattening a range, you can easily manipulate and analyze data without dealing with multiple rows and columns.

In simpler terms, FLATTEN takes a multi-dimensional array and transforms it into a one-dimensional array, making it easier to work with in various scenarios.

A Practical Example

Imagine you have a table of sales data for different products, organized in a grid format:

Sales Data Table:

ProductQ1 SalesQ2 SalesQ3 Sales
Widget A100150200
Widget B120130140
Widget C9011095

You want to create a single column that lists all the sales figures for each product across all quarters.

FLATTEN Formula

To achieve this, you would use the FLATTEN function as follows:

Google Sheets
=FLATTEN(A2:D4)

In this formula:

  • A2:D4 is the range that contains the sales data, including product names and sales figures.

Result of the Formula

When you apply the FLATTEN formula to the Sales Data Table, the output would look like this:

Sales Figures
Widget A
100
150
200
Widget B
120
130
140
Widget C
90
110
95

As you can see, the FLATTEN function has transformed the multi-dimensional array into a single column, making it easier to analyze the sales figures.

Why Use FLATTEN?

FLATTEN is beneficial because it simplifies the organization of data, allowing for easier analysis and manipulation. It can be particularly useful when you need to prepare data for charts, pivot tables, or other analytical tools that require a linear format. Additionally, it helps in cleaning up data by removing the complexity of multiple rows and columns.

Key Takeaways:

  • FLATTEN: A Google Sheets function that converts a multi-dimensional array into a single column.
  • Simplifies Data: Makes it easier to analyze and manipulate data in a linear format.
  • Common Use Cases: Ideal for preparing data for charts, pivot tables, and other analytical tools.

FLATTEN is an essential function for anyone working with data in Google Sheets, providing a powerful way to enhance data organization and analysis capabilities.

Happy spreadsheeting!

Example use case

You have a table with multiple columns for sales data across different regions. By using the FLATTEN formula, you can convert this multi-column data into a single column list, making it easier to analyze total sales figures without losing any information.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.