Back to functions
Lookup & Reference2026-11-161 related article

TOROW Function in Excel

Turn a range or array into one row, choosing the reading order and whether to omit blanks or errors.

Syntax

TOROW(array, [ignore], [scan_by_column])
Table of Contents

Arguments

array

Required

The range or array to turn into a single row.

ignore

Optional

Use 0 to keep all values (default), 1 to omit blanks, 2 to omit errors, or 3 to omit blanks and errors.

scan_by_column

Optional

FALSE or omitted reads across each source row. TRUE reads down each source column.

What it returns

A single-row array in the chosen scan order, keeping repeated values unless they are excluded by the ignore setting.

What TOROW does

TOROW places the values from a grid into one horizontal row. Each source value gets its own cell. You choose whether Excel reads across the source rows or down its columns before moving to the next part of the grid.

Practical examples

Put two source rows side by side

Enter these values in B4:D5:

RowBCD
4111213
5212223

Leave B8:G8 empty and enter this in B8:

=TOROW(B4:D5)
Formula

The expected result across B8:G8 is:

11    12    13    21    22    23
Example

TOROW finishes the first source row before reading the second. The result needs six columns, although the source has only three.

Read each source column as a pair

Keep the same source grid. Leave B10:G10 empty and enter this in B10:

=TOROW(B4:D5,0,TRUE)
Formula

The expected result is:

11    21    12    22    13    23
Example

The final TRUE tells Excel to read B4 and B5, then C4 and C5, then D4 and D5. The output stays horizontal; only the sequence changes.

Remove a blank and an error from the row

On another sheet, put 11 in B4, leave C4 truly empty, and put 13 in D4. In the next row, put 21 in B5, numeric 0 in C5, and the error value #N/A in D5. In B8, with B8:E8 clear, enter:

=TOROW(B4:D5,3)
Formula

The expected four-column result is:

11    13    21    0
Example

The blank and error are omitted. The number zero remains, because it isn't a blank.

Common mistakes and notes

A row result can need a lot of columns

Without exclusions, the number of output columns equals the number of source cells. Reserve the whole width and keep the formula outside an Excel Table. Use TOCOL if a long vertical list is easier to work with.

Default blank handling can introduce displayed zeros

Microsoft's example shows truly blank source cells as zeros when all entries are kept. Use ignore mode 1 for blanks only or 3 for blanks and errors. Empty text from a formula and a typed space are different from a truly unused cell; inspect the source before treating an empty-looking result as a blank.

Error exclusion is a reporting choice

Ignore mode 2 keeps blanks but removes errors; mode 3 removes both. Either can conceal a source problem by leaving its entry out. Retain errors while investigating an unexpected result.

TOROW doesn't join text or remove duplicates

Every retained entry occupies a separate cell, and repeated values remain repeated. For a two-dimensional result with rows and columns swapped, use TRANSPOSE. The flattening tutorial compares TOCOL and TOROW on the same grid.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use TOROW.

Official documentation