FormulaCamp
Completed
← Google Sheets functions
Google Sheets function

TOCOL in Google Sheets

TOCOL with worked examples you can test in the live grid. The argument details are in the Excel guide.

In Google Sheets

The arguments and common errors are covered in the TOCOL Excel guide; check the function help in Google Sheets for its own argument list.

Worked examples in Google Sheets

Row by row

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500

Formula: F2: =TOCOL(B2:C3)

Result: Spills down: Ana, 1200, Ben, 850

The default order reads the first row, Ana and 1200, then the second row.

Column by column

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500

Formula: F2: =TOCOL(B2:C3,,TRUE)

Result: Spills down: Ana, Ben, 1200, 850

With scan_by_column TRUE, the names come first, then the amounts.

Skip blank cells

AB
1ab
2d

Formula: D1: =TOCOL(A1:B2,1)

Result: Spills down: a, b, d

The ignore code 1 leaves out the blank cell, so only three items remain.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =TOCOL(C2:D3)

Example spreadsheet for TOCOL
ABCDEF
1RegionProductUnitsPriceResult
2EastPen1202.5120
3WestPen802.52.5
4EastBook451280
5NorthBook60122.5
6WestLamp3025
7EastLamp1525
Result in F2: 120

Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.