Formualizer Docs
ReferenceFunctionsLookup Functions

COLUMNS

Returns the number of columns in a reference or array.

Summary

COLUMNS reports width, not data density.

Remarks

  • For a single cell reference, returns 1.
  • For full-row references (for example 1:1), returns 16384.
  • For array literals, returns the first row width.
  • Invalid references return an error.

Examples

Count columns in a rectangular range
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
3
Count columns in a full row reference
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
16384

FAQ

Does COLUMNS count non-empty cells?

No. COLUMNS returns the width of the referenced array/range, including blank cells.

What does COLUMNS return for a full-row reference like 1:1?

It returns the sheet column limit, 16384.

Runtime metadata

Category

Lookup

Signature

COLUMNS(arg1: Any (Range))

Arity

min 1, max 1

Arguments

arg1

Any · Range

Caps

PURE

Source

On this page