Contact

TOROW in Excel: Flatten a Range into a Single Row

Lookup Intermediate Microsoft Excel

Use Excel TOROW to create one horizontal sequence, select scan order, omit blanks or errors, and build a checked text summary.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: TOROW turns a rectangular range into one horizontal row. Choose the scan order deliberately so the flattened sequence matches how the source is meant to be read.

Availability and version history

  • First introduced: Preview announced March 16, 2022, for Windows Beta 2203 (build 15104.20004) and Mac 16.60 (build 22030400); web and Microsoft 365 Current Channel deployment reported September 29, 2022. Official introduction.
  • Current documented status: the dedicated help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac. Availability depends on the installed build.
  • Evidence checked: October 14, 2026. Official TOROW help. Examples below were independently calculated, not executed in Excel.

Syntax and optional arguments

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

The default ignore value is 0: keep every entry. Values 1, 2 and 3 omit blanks, errors, or both, respectively. The default scan order is by row; supplying TRUE as the third argument scans by column. TOROW reference

The third argument controls reading order, not output orientation. TOROW still returns a row when that argument is TRUE.

Example 1: make a horizontal sequence of labels

Enter this two-by-three grid in A1:C2. These are data labels, not headings:

North-1  North-2  North-3
South-1  South-2  South-3

In A5 enter:

=TOROW(A1:C2)

Expected A5:F5 values are North-1, North-2, North-3, South-1, South-2, South-3. The complete North row is read before the South row.

This is a six-cell horizontal spill, not one cell containing comma-separated text. The commas in the explanation separate the displayed values; they are not added to the actual cells.

Example 2: alternate labels by source column

=TOROW(A1:C2,0,TRUE)

Expected horizontal sequence: North-1, South-1, North-2, South-2, North-3, South-3.

This order is appropriate when the first column is one pair, the second column another pair, and so on. If the original columns represent unrelated data fields, do not assume that interleaving them produces a meaningful table.

Example 3: handle a blank and an error separately

On a fresh sheet, set A1 to Red, leave B1 genuinely empty, and put Blue in C1. In the second row, enter numeric 0 in A2, Green in B2 and the formula =NA() in C2.

With all entries kept:

=TOROW(A1:C2)

Expected sequence: Red, 0, Blue, 0, Green, #N/A. The empty source cell becomes a zero in the output, the genuine numeric zero also remains, and the error is retained as an error value.

With only blanks omitted:

=TOROW(A1:C2,1)

Expected sequence: Red, Blue, 0, Green, #N/A. The retained error can alert readers that the source still needs attention.

With blanks and errors omitted:

=TOROW(A1:C2,3)

Expected sequence: Red, Blue, 0, Green. A numeric zero does not count as a blank. This setup uses a physically empty B1, not a formula returning empty text; do not silently treat those source cases as identical.

Advanced example: create one joined report label

For the second dataset, combine TOROW with TEXTJOIN:

=TEXTJOIN(" | ",TRUE,TOROW(A1:C2,3))

Expected single-cell text: Red | Blue | 0 | Green.

TOCOL is unnecessary here because TEXTJOIN can consume the resulting array. TOROW is useful when its explicit scan order is part of the report specification. The filter flag 3 removes source blanks and errors before joining; the zero remains and becomes the character 0 in the final text.

To use column-wise reading instead:

=TEXTJOIN(" | ",TRUE,TOROW(A1:C2,3,TRUE))

Expected text: Red | 0 | Green | Blue. Compare this with the row-wise result before publishing a sequence where order has meaning.

Troubleshooting and limits

Leave enough empty cells to the right of the formula. A spill running into existing content needs a different output location or cleared cells, not a copied formula in every position.

The official help documents #NUM! for an array that is too large and a #VALUE! case involving non-whole-number array constants. The examples here use ranges; that array-constant note is not a blanket restriction against decimal numbers stored in cells.

Suppressing source errors can make a summary look clean while hiding missing information. Decide whether a separate error count or source-quality check is required. A reshape also does not remove duplicates; use a dedicated uniqueness rule if that is part of the task.

Verification: Inputs are fictional. Expected values and array shapes were independently calculated from these inputs; no native Excel execution or screenshot is claimed. See the editorial testing standards.