1. Home
  2. Functions
  3. Array
  4. TOCOL

TOCOL function

Returns the values of an array as a single column.

Syntax

=TOCOL(array, [ignore], [scan_by_column])

Arguments

ArgumentRequiredDescription
arrayRequiredThe range or array
ignoreOptional0 keep all (default), 1 skip blanks, 2 skip errors, 3 skip blanks and errors
scan_by_columnOptionalFALSE (default) reads row by row, TRUE column by column

How to use TOCOL

When TOCOL returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

TOCOL takes 1 required argument and 2 optional arguments. Type =TOCOL( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=TOCOL({1,2;3,4})Result 4 by 1 array
Spilled result
A
11
22
33
44
=TOCOL({1,2;3,4}, 0, TRUE)Result 4 by 1 array
Spilled result
A
11
23
32
44

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.