By default, TOCOL will scan values by row, left to right.

However, TOCOL can also be configured to scan the array by column, top to bottom.

TOCOL also provides options for skipping empty cells and errors.

TOROW basic example

Theignoreargument controls what values TOCOL will optionally ignore.

By default,scan_by_columnis FALSE and TOCOL will read values “by row” from left to right.

To read values instead by column, setscan_by_columnto TRUE or 1.

TOROW basic example

Use the TOCOL function to transform an array into a singlecolumnand theTOROW functionto transform an array into a singlerow.

Note: In Excel,arrays map directly to ranges.

To read values instead by column, setscan_by_columnto TRUE or 1.

TOROW basic example

The worksheet below shows the default “by row” behavior in F4.

Also note the optionalignoreargument has been left empty.

By default, TOROW will scan values by row, but TOROW can also scan values by column.

TOROW basic example

The result is a “trimmed” range that only includes data from the used portion of the range.

TOROW basic example

TOCOL example - ignore blanks and errors

TOCOL example - scan values by column

Excel formula: Get location of value in 2D array

Excel formula: Get address of named range or table

Excel TOROW function

Excel WRAPROWS function

Excel WRAPCOLS function

Excel TRIMRANGE function

TOCOL example - ignore blanks and errors