Spreadsheet Practice

TOCOL function

Quick answer

TOCOL turns a range or array into a single column, reading across each row unless you ask for column by column.

Syntax
=TOCOL(array, [ignore], [scan_by_column])
Most common use
=TOCOL(A2:C3,1) returns Ana (Row by row, blanks skipped)

Its ignore argument can skip blanks, errors or both. Use it to stack a grid of names into one list and then feed that list to UNIQUE, SORT or COUNTA.

Available in
Excel 2024 and Microsoft 365
Category
Dynamic array functions
Returns
A one-column array that spills down.
Google Sheets
Available in Google Sheets.

Syntax

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

ArgumentRequired?What it is
arrayRequiredThe range or array to flatten.
ignoreOptionalOptional: 0 keeps everything (default), 1 skips blanks, 2 skips errors, 3 skips both.
scan_by_columnOptionalOptional: TRUE reads down each column first; FALSE (default) reads across each row.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
E2=TOCOL(A2:C3,1)Anaspills 4 × 1Row by row, blanks skipped
F2=TOCOL(A2:C3,1,TRUE)Anaspills 4 × 1Column by column instead
G2=COUNTA(UNIQUE(TOCOL(A2:C3,1)))33 different people on the rota

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
MonTueWed
AnaRajAnaAna3
LeeAnaRajLee
LeeRaj
AnaAna

Practice TOCOL

Graded instantly, then re-checked on changed data.

One list of names

In F2, list every name from the rota in B2:D5 in a single column, reading across each row and skipping the empty cells.

Common mistakes

What you seeWhy, and how to fix it
Zeros where blanks wereBlank cells come through as 0. Set ignore to 1 to skip them.
#SPILL!The cells below aren't empty.
The order is wrongTOCOL reads across each row by default. Set scan_by_column to TRUE to read down each column.

Tips

  • =UNIQUE(TOCOL(A2:F20,1)) lists every distinct entry in a grid.

Questions

How do I turn a range into one column in Excel?

=TOCOL(A2:D10) stacks every row into one column. Add 1 as the second argument to skip blanks.

How is TOCOL different from TRANSPOSE?

TRANSPOSE swaps rows and columns but keeps the grid; TOCOL turns any shape into a single column.

Answers that use TOCOL

Updated Checked by running: every formula on this page was run by our formula engine on .