Array

TOROW Formula

Converts a multi-row array or range into a single row by reading values either row by row or column by column. TOROW is the horizontal counterpart of TOCOL, useful when you need to flatten a grid into a single row for horizontal lookups, chart data series, or concatenation.

Syntax

TOROW(array, [ignore], [scan_by_column])
ParameterDescription
array Parameter of the TOROW function.
[ignore] (Optional.) Parameter of the TOROW function.
[scan_by_column] (Optional.) Parameter of the TOROW function.
Try TOROW in Viztab — free, no signup

Examples

Flatten a grid to one row

Formula
=TOROW(A1:C4)
Returns all 12 values from the 4x3 grid as a single row with 12 columns, reading left-to-right then top-to-bottom.

Skip errors

Formula
=TOROW(A1:D5, 2)
Flattens the range to a row while skipping any error values (#N/A, #VALUE!, etc.).

Scan by column

Formula
=TOROW(A1:B3, 0, TRUE)
Reads A1, A2, A3, B1, B2, B3 — scanning down each column first before moving to the next.

Common Errors

#CALC!

After removing blanks or errors, no values remain.

#SPILL!

The horizontal spill range is blocked by existing content.

Tips

Horizontal data for charts

Some chart types expect data in rows. Use TOROW to reshape vertical data into a horizontal series without restructuring your source data.

Combine with TEXTJOIN

=TEXTJOIN(", ", TRUE, TOROW(A1:C4)) flattens a grid and joins all values into a single comma-separated string.

Ignore blanks for clean data

Set the ignore argument to 1 when your source range has gaps. This prevents empty positions in your output row.

Try TOROW in Viztab

Import your data and use TOROW with 370+ other formulas. No signup required.

Open Viztab

Related Formulas