ReferenceFunctionsLookup Functions
TOCOL
TOCOL: Converts an array or range into a single column.
Summary
Flattens input values into one column, with options to ignore blanks/errors and to scan by row or by column.
Remarks
ignorevalues are0keep all,1ignore blanks,2ignore errors,3ignore both.scan_by_columndefaults to FALSE, so values are read row by row.
Examples
Flatten row by row
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
[[1],[2],[3],[4]]
Scan by column
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
[[1],[3],[2],[4]]
Related functions
FAQ
Can TOCOL filter blanks and errors?
Yes. Use the ignore argument to drop blanks, errors, or both.
Runtime metadata
Category
Lookup
Signature
TOCOL(arg1: Range | Any (Range), arg2?: Number, arg3?…: Logical | Number)Arity
min 1, max variadic
Arguments
arg1Range | Any · Range
arg2optionaldefaultNumber · Scalar · coercion NumberLenientText
arg3optionaldefaultLogical | Number · Scalar
Caps
PURE
Source