ID EN
#Dynamic array

TOROW

Excel Functions

Transform array to single row

Syntax

EXCEL
=TOROW(array, ignore, scan_by_column)

Arguments

Parameter Description
array The array to transform.
ignore Control to ignore blanks and errors.
scan_by_column Scan array by column. TRUE = by column, FALSE = by row (default).

Return Value

A single row of values

Details

The TOROW function transforms an array or range into a single row. TOROW can scan values by row, left to right (default) or by column, top to bottom. The TOROW function takes three arguments: array, ignore, and scan_by_column. Array is the only required argument and represents the array or range to be transformed. The ignore argument controls what values TOROW will optionally ignore. The options for ignore are as follows: The scan_by_column argument is a boolean value that controls how TOROW reads values from the source array. By default, scan_by_column is FALSE and TOROW will read values "by row" from left to right. At the end of each row, TOROW will move down and read values from the next row in the same order. To read values instead by column, set scan_by_column to TRUE or 1. In this mo

Examples

Basic usage

By default, the TOROW function transforms a two-dimensional array into a single row, one row at a time. In the example below, the formula in F4 is:

EXCEL
=TOROW(B4:D5)
Ignore blanks and errors

The ignore argument in TOROW can be set to ignore blanks and/or errors like this:

EXCEL
=TOROW(array,1) // ignore blanks
=TOROW(array,2) // ignore errors
=TOROW(array,3) // ignore blanks and errors
Scan by column

By default, TOROW will read values "by row" from left to right. To read values instead by column, set scan_by_column to TRUE or 1. The worksheet below

EXCEL
=TOROW(B4:D5,,TRUE)

See Also

TOCOL WRAPROWS WRAPCOLS TRIMRANGE