TOCOL function in Google Sheets
Transforms an array or range of cells into a single column.
=TOCOL(array_or_range, [ignore], [scan_by_column])TOCOL syntax and parameters
Three arguments, one required.
- array_or_rangeanyRequired
The array or range of cells to return as a column.
- ignorenumberOptional
By default, no values are ignored. Specify one of these values: 0: Keep all values 1: Ignore blanks 2: Ignore errors 3: Ignore blanks and errors
- scan_by_columnbooleanOptional
The boolean value of scan_by_column determines how the array is scanned. By default, the TOCOL function scans the array by row. True: Scans the array by column False: Scans the array by row
TOCOL examples
Formulas you'll actually reuse.
Flatten a 12×12 month grid into one column, row by row:
=TOCOL(B2:M13)Same grid, read column by column and skipping blanks (ignore = 1):
=TOCOL(B2:M13, 1, TRUE)
TOCOL in Excel
Same name — your formula ports as-is.
Try TOCOL in the playground
Edit the example — nothing to install.
Preloaded with the TOCOL formula from Example 1 — change anything and watch it respond.
Related functions
More ways Google Sheets gets this done.
- CHOOSECOLSCreates a new array from the selected columns in the existing range.ArrayExcel
- CHOOSEROWSCreates a new array from the selected rows in the existing range.ArrayExcel
- HSTACKAppends ranges horizontally and in sequence to return a larger array.ArrayExcel
- LINESTGiven partial data about a linear trend, calculates various parameters about the ideal linear trend using the least-squares method.ArrayExcel
- MDETERMReturns the matrix determinant of a square matrix specified as an array or range.ArrayExcel
- MINVERSEReturns the multiplicative inverse of a square matrix specified as an array or range.ArrayExcel