Spreadsheet Practice

TOROW function

Quick answer

TOROW turns a range or array into a single row, reading across each row unless you ask for column by column.

Syntax
=TOROW(array, [ignore], [scan_by_column])
Most common use
=TOROW(A2:A4) returns Ana (The names across a row)

Like TOCOL, it can skip blanks and errors. Use it to lay a list out across a header row, or to feed a whole grid into a function that wants one row of values.

Available in
Excel 2024 and Microsoft 365
Category
Dynamic array functions
Returns
A one-row array that spills to the right.
Google Sheets
Available in Google Sheets.

Syntax

=TOROW(array, [ignore], [scan_by_column])

ArgumentRequired?What it is
arrayRequiredThe range or array to flatten.
ignoreOptionalOptional: 0 keeps everything (default), 1 skips blanks, 2 skips errors, 3 skips both.
scan_by_columnOptionalOptional: TRUE reads down each column first; FALSE (default) reads across each row.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
D2=TOROW(A2:A4)Anaspills 1 × 3The names across a row
D3=TOROW(B2:B4,1)88spills 1 × 2The scores, with the blank skipped
D4=COLUMNS(TOROW(A2:B4,1))55 values once the blank is left out

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
NameScore
Ana88AnaRajLee
Raj928892
Lee5

Practice TOROW

Graded instantly, then re-checked on changed data.

Names across a row

In C1, lay out the names in A2:A6 across row 1, starting in C1.

Common mistakes

What you seeWhy, and how to fix it
#SPILL!The cells to the right aren't empty.
Zeros where blanks wereBlank cells come through as 0. Set ignore to 1 to skip them.

Tips

  • =TEXTJOIN(", ",TRUE,TOROW(A2:C5)) joins a whole grid into one line of text.

Questions

How do I turn a column into a row in Excel?

=TOROW(A2:A10), or TRANSPOSE. TOROW also works on grids and can skip blanks.

What is the difference between TOROW and TOCOL?

Only the direction: TOROW returns one row, TOCOL one column.

Answers that use TOROW

Updated Checked by running: every formula on this page was run by our formula engine on .