Need to convert multiple rows of data into a single row? Excel’s TOROW function does exactly that. Let’s explore how this function works, from basic usage to advanced techniques that will help you restructure your data.
Converting Multiple Rows to a Single Row in Excel
Set Up Your Sample Dataset
First, let’s create a simple dataset to demonstrate TOROW’s capabilities.
A |
B |
C |
---|---|---|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Basic TOROW Implementation
Step 1: Select your target cell Step 2: Enter the basic TOROW formula
Copy
=TOROW(A1:C3)
This transforms your data into:
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

Add the Scan_by_Column Parameter
TOROW offers flexibility in how it reads your data. The scan_by_column parameter changes the reading order.
Step 1: Set scan_by_column to TRUE
Copy
=TOROW(A1:C3, TRUE)
Results in:
| 1 | 4 | 7 | 2 | 5 | 8 | 3 | 6 | 9 |

Handle Errors with the Ignore Parameter
The ignore parameter helps manage error values in your data.
Example with error values:
A |
B |
C |
---|---|---|
1 |
#N/A |
3 |
4 |
5 |
#VALUE! |
Copy
=TOROW(A1:C2, FALSE, TRUE)

Scanning Data by Columns
Column-first scanning changes how TOROW processes your data. Let’s examine a practical example using sales data:
Month |
Sales |
Units |
---|---|---|
Jan |
1000 |
50 |
Feb |
1200 |
60 ![]()
Try the Free Spreadsheet Extension Over 500,000 Pros Are Raving About
Stop exporting data manually. Sync data from your business systems into Google Sheets or Excel with Coefficient and set it on a refresh schedule. Get Started![]() |
Copy
=TOROW(A1:C3, TRUE)
This creates a sequence: Month, Jan, Feb, Sales, 1000, 1200, Units, 50, 60

Combine TOROW with Other Array Functions
TOROW with FILTER
Create filtered single-row results:
Copy
=TOROW(FILTER(A1:C10, B1:B10>1000))

TOROW with SORT
Generate ordered single-row output:
Copy
=TOROW(SORT(A1:C10, 2, 1))

Essential TOROW Components
TOROW syntax breakdown:
Copy
=TOROW(array, [scan_by_column], [ignore_empty])
Parameters:
- array: Required. The range to convert
- scan_by_column: Optional. TRUE/FALSE for scanning direction
- ignore_empty: Optional. TRUE/FALSE for handling empty cells
Common Applications
- Data Consolidation Example: Combining regional sales data
Copy
=TOROW(Sheet1:Sheet3!A1:A10)
- Matrix Transformation Convert complex matrices into linear formats for analysis
- Dashboard Creation Build dynamic single-row summaries for reporting
TOROW vs TRANSPOSE: Key Differences
Feature |
TOROW |
TRANSPOSE |
---|---|---|
Output |
Single row |
Flips rows/columns |
Flexibility |
Scanning options |
Fixed transformation |
Use Case |
Data linearization |
Matrix rotation |
Next Steps
Start small with TOROW. Test it on simple datasets before moving to complex data structures. Pay attention to your scanning direction – it can significantly impact your results.
Ready to take your spreadsheet capabilities further? Try Coefficient to connect your spreadsheets directly to your business data sources and automate your data imports.