TOCOL Function
The TOCOL
function in Google Sheets converts an array or range into a single column.
Syntax
TOCOL(array_or_range, [ignore], [scan_by_column])
array_or_range
: The array or range to convert.ignore
(optional): Specify values to ignore. By default, no values are ignored.scan_by_column
(optional): If TRUE, the function scans values by column first.
Examples
- Basic Conversion
Convert the array in A1:C3 into a single column:
=TOCOL(A1:C3)
- Ignoring Zeros
Convert the array and ignore zeros:
=TOCOL(A1:C3, 0)
- Scanning by Column
Convert and scan by column:
=TOCOL(A1:C3, , TRUE)
Notes
- Useful for flattening arrays for further data analysis or visualization.