TOROW(array_or_range, [ignore], [scan_by_column])One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
array_or_range:
The array or range of cells that you want to convert into a single row.
ignore:
An optional parameter that specifies whether to ignore empty cells in the array or range. If set to TRUE, empty cells are ignored; if FALSE or omitted, empty cells are included.
scan_by_column:
An optional parameter that determines the order in which the array or range is scanned. If set to TRUE, the array is scanned by column; if FALSE or omitted, it is scanned by row.
The TOROW function in Google Sheets is a useful tool that transforms a range or array into a single row. This function is particularly helpful when you want to consolidate data from multiple rows into a single row format, making it easier to analyze or present the information.
In simpler terms, TOROW allows you to take a block of data and flatten it into a single row, which can be beneficial for data manipulation and reporting.
Imagine you have a dataset containing sales data for different products stored in a Google Sheets spreadsheet:
| ProductID | ProductName | January | February | March |
|---|---|---|---|---|
| 101 | Widget A | 10 | 15 | 20 |
| 102 | Widget B | 5 | 10 | 15 |
| 103 | Widget C | 8 | 12 | 18 |
You want to convert the sales data for each product into a single row format for easier analysis.
To achieve this, you would use the TOROW function as follows:
=TOROW(A2:E4)In this formula:
A2:E4 is the range that contains the sales data you want to transform into a single row.When you apply the TOROW formula to the Sales Data Table, the output would look like this:
| ProductID | ProductName | January | February | March |
|---|---|---|---|---|
| 101 | Widget A | 10 | 15 | 20 |
| 102 | Widget B | 5 | 10 | 15 |
| 103 | Widget C | 8 | 12 | 18 |
The result will be a single row that contains all the values from the selected range, effectively flattening the data.
TOROW is beneficial because it simplifies the process of reorganizing data in Google Sheets. It allows you to quickly transform multi-row data into a single row format, making it easier to visualize and analyze. This function is particularly useful when preparing data for charts or reports.
TOROW is an essential function for anyone working with data in Google Sheets, providing a powerful way to enhance data organization and presentation.
Happy spreadsheeting!
You have a matrix of sales data with products in rows and months in columns. Use the TOROW formula to convert this matrix into a single column for easier analysis and visualization, allowing you to quickly identify trends and patterns in sales performance.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.