Ravindra BagaleCourses & study guides Track your progress

Excel TOCOL Function

Chala mitrano — today TOCOL. Turn a grid into one tall column — ready for UNIQUE or SORT.

Fictional sample data for learning. Unpivot-ish flatten for Tiruppur size grids and Leeds matrices.

Purpose

Flatten an array into a single column.

Return value

A spilled column vector.

Syntax

TOCOL(array, [ignore], [scan_by_col])

Arguments

ArgumentRequired?Description
arrayRequiredArray to flatten.
ignoreOptional0 keep all; 1 skip blanks; 2 skip errors; 3 skip blanks+errors.
scan_by_colOptionalTRUE reads column-by-column.

Version

Microsoft 365. Not in perpetual Excel 2019 without dynamic arrays. Sheets has partial cousins.

How to use — Why → What → How

Why: Matrix data needs a flat list before distinct counts. TOCOL is the flatten. Unpivot-ish flatten for Tiruppur size grids and Leeds matrices. In Indian back offices and foreign sister teams, TOCOL shows up on live dashboards and spill ranges every week.

What: TOCOL walks the array row-wise by default. ignore skips blanks/errors. Read every argument in the table once before you type; each one changes the answer on purpose.

How — numbered steps:

  1. Type =TOCOL(A2:C10).
  2. ignore 1 to skip blanks.
  3. scan_by_col TRUE for column order.

Ravindra Bagale's Tip

Friends, after TOCOL, find one column or range in a real workbook this week where this lesson saves time.

Ravindra Bagale's Tip

Friends, sleep on TOCOL; rebuild example 1 tomorrow without looking.

Ravindra Bagale's Tip

Friends, say the business question in plain words before =TOCOL.

Ravindra Bagale's Tip

Friends, check a known case with a calculator before you trust a long TOCOL chain.

Ravindra Bagale's Tip

Friends, after you finish TOCOL, open yesterday’s real workbook and find one place this function would have saved ten minutes.

Ravindra Bagale's Tip

Friends, treat TOCOL like a seatbelt on spill ranges — clear #SPILL! blocks first.

Download practice file: practice-tocol.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) Flatten 2×2

Tiruppur.

AB
12
34
Formula: =TOCOL(A2:B3)

Result: {1;2;3;4}

What it means: Row-wise.

2) Skip blanks

ignore 1.

AB
1None
34
Formula: =TOCOL(A2:B3,1)

Result: {1;3;4}

What it means: Blank skipped.

3) By column

scan.

AB
12
34
Formula: =TOCOL(A2:B3,,TRUE)

Result: {1;3;2;4}

What it means: Col-wise.

4) Leeds £

Grid.

AB
1020
3040
Formula: =TOCOL(A2:B3)

Result: {10;20;30;40}

What it means: Flat.

5) Then UNIQUE

Distinct.

AB
12
13
Formula: =UNIQUE(TOCOL(A2:B3))

Result: {1;2;3}

What it means: Distinct flat.

6) ignore errors

Skip errors.

A
1
None
Formula: =TOCOL(A2:A3,1)

Result: {1}

What it means: Blanks skipped with ignore 1.

Common errors and fixes

#SPILL! — Blocked. Fix: Clear.
Order — Row-wise default. Fix: scan_by_col changes it.
ignore codes — 0/1/2/3. Fix: Memorise 1 for blanks.

Notes and tips

  • Revisit the TOCOL errors table after the quiz.
  • Build example 1 from memory on a blank sheet.
  • Check number vs text if a result looks wrong.
  • Teach one tip in Marathi or Hindi this week.
  • Keep currency symbols consistent inside one report column (practice mixes ₹ $ £ €).
  • Drill: flatten a 2×2 and UNIQUE it from memory.
  • TOCOL vs WRAPROWS: flatten versus re-wrap.
  • Fictional sample data only — names and amounts are for learning.
  • Print the TOCOL revision card for one week of real worksheets.
  • Ask juniors to predict before they press Enter.
  • Track your top mistake with this function monthly.
  • Unpivot-ish flatten for Tiruppur size grids and Leeds matrices.
  • Interview tip: explain the business question before the formula.
  • Classroom drill: invent three brand-new formulas from your city without the page open.
  • If a result looks wrong, check blanks vs zeros before rewriting.
  • When Excel versions differ, note the LibreOffice / Sheets fallback in a cell comment.
  • Prefer clear ranges over whole-column refs on huge sheets if speed matters.
  • Document units (₹, kg, days) in the header so totals stay honest.
  • Print the revision card for TOCOL for one week of real worksheets.
  • When helping a junior, ask them to predict before Enter.
  • Share one tip with a classmate in Marathi or Hindi.
  • Keep currency symbols consistent inside a single report column.
  • Interview tip: explain the business question before the formula.
  • If a result looks wrong, check spill range blocks (#SPILL!) before rewriting.
  • When Excel versions differ, write a LibreOffice / Sheets fallback under a comment.

In real work

Drill: flatten a 2×2 and UNIQUE it from memory. Unpivot-ish flatten for Tiruppur size grids and Leeds matrices. Classroom drill: write three brand-new TOCOL formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose and watch the error; recovering from that break is half of interview readiness. Always verify with a known case before trusting a long chain. Keep a personal notebook of the one mistake you make most often with this function; review it monthly.

How it compares

TOCOL vs WRAPROWS: flatten versus re-wrap.

Interview corner

vs TOROW?
Column vs row.
ignore 1?
Skip blanks.
Order?
Row-wise default.

TOROW, TOCOL, UNIQUE, WRAPROWS

Practice tasks (10)

  1. Task 1. Flatten 2×2.
    TOCOL.
  2. Task 2. Skip blanks.
    ignore 1.
  3. Task 3. By column.
    scan.
  4. Task 4. UNIQUE flat.
    Distinct.
  5. Task 5. Leeds grid.
    £.
  6. Task 6. Interview.
    Talk.
  7. Task 7. Teach.
    Teach.
  8. Task 8. ignore errors.
    2.
  9. Task 9. Fill.
    Fill.
  10. Task 10. Document.
    Note.

Quick quiz

Q1. TOCOL default walk?
Q2. ignore 1 skips?
Q3. 2×2 → length?
Q4. Cousin row?
Q5. Then distinct?

Answers: Q1=Row-wise, Q2=Blanks, Q3=4, Q4=TOROW, Q5=UNIQUE(TOCOL()) (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: TOCOL
TOCOL revision card