Excel TOROW Function: Transform Arrays to Single Rows (2025 Guide)

Published: January 21, 2025 - 2 min read

Vijay Srinivas

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

Coefficient Excel Google Sheets Connectors
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

  1. Data Consolidation Example: Combining regional sales data

Copy

=TOROW(Sheet1:Sheet3!A1:A10)

  1. Matrix Transformation Convert complex matrices into linear formats for analysis
  2. 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.

Sync Live Data into Your Spreadsheet

Connect Google Sheets or Excel to your business systems, import your data, and set it on a refresh schedule.

Try the Spreadsheet Automation Tool Over 500,000 Professionals are Raving About

Tired of spending endless hours manually pushing and pulling data into Google Sheets? Say goodbye to repetitive tasks and hello to efficiency with Coefficient, the leading spreadsheet automation tool trusted by over 350,000 professionals worldwide.

Sync data from your CRM, database, ads platforms, and more into Google Sheets in just a few clicks. Set it on a refresh schedule. And, use AI to write formulas and SQL, or build charts and pivots.

Vijay Srinivas GTM @ Coefficient
Vijay Srinivas is an engineer turned marketer who loves to dabble in data and has 6 years of experience in GTM for Startups and SaaS orgs. Building his skills currently to be a PLG & spreadsheet expert.
500,000+ happy users
Wait, there's more!
Connect any system to Google Sheets in just seconds.
Get Started Free

Trusted By Over 50,000 Companies