Wauvel

Excel like a finance pro.

← The library

Lookup function

COLUMNS

Returns the number of columns in a range.

OccasionalDifficulty 1050 · CapableUsage rank #91 of 520
Practice · 2 questions →

When to use it

How many columns a range has.

The shape of it

Syntax
=COLUMNS(array)

Worked examples

  • Range width

    =COLUMNS(A1:D1) 4

    Four columns.

  • Table width

    =COLUMNS(A2:C6) 3

    The width of the product table.

  • Fill-right lookup

    =VLOOKUP($A10,$A$2:$F$6,COLUMNS($A$1:B$1),0) 10

    Copied right, the column index grows 2, 3, 4.

Worth knowing

  • COLUMNS($A$1:A$1) is a running counter across a row.
  • Last column of a range: =INDEX(range,1,COLUMNS(range)).
  • Pairs with ROWS for cell counts.

Where it goes wrong

  • Counts the range width, not the filled cells.
  • Whole-row references return 16,384.

Related

Learn the moves here — or let Wauvel run them on your numbers.

Meet your AI CFO →

One CFO-grade Excel tip a week

A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.