# TOCOL formula generator

> Describe what you need and get a TOCOL formula for Excel and Google Sheets, run on real data before you copy it. Plus 4 tested TOCOL examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/tocol · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

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

Describe the task at [TOCOL formula generator](https://spreadsheetpractice.com/tools/formula-generator/tocol) and get a TOCOL formula for Excel and Google Sheets, tested on real data.

## Tested TOCOL examples

### Convert a table into one column

`=TOCOL(B2:E4,1)`

Excel. Result on the sample sheet: 10 rows (G2:G11). [See it and try it](https://spreadsheetpractice.com/formulas/convert-a-table-into-one-column)

### Get unique values from multiple columns

`=SORT(UNIQUE(TOCOL(B2:D6,1)))`

Excel. Result on the sample sheet: 6 rows (F2:F7). [See it and try it](https://spreadsheetpractice.com/formulas/unique-values-from-multiple-columns)

### Split cells into rows

`=TOCOL(ARRAYFORMULA(SPLIT(B2:B5,", ",FALSE)),1)`

Google Sheets. Result on the sample sheet: 8 rows (D2:D9). [See it and try it](https://spreadsheetpractice.com/formulas/split-cells-into-rows)

### Count unique values across multiple columns

`=COUNTA(UNIQUE(TOCOL(B2:D6,1)))`

Excel. Result on the sample sheet: 7. [See it and try it](https://spreadsheetpractice.com/formulas/count-unique-values-across-multiple-columns)

## Questions

### What does the TOCOL formula generator do?

You describe the task in plain English, and it writes the formula, using TOCOL where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

### What does TOCOL do?

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

### Can I learn to write TOCOL formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the TOCOL function page has a practice exercise.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
