COLUMNS
returns number of columns in a reference · from excel · excel: not yet compared · sheets: not yet compared
signature
COLUMNS(array)
returns: number
| argument | required |
|---|---|
| array | required |
examples
formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | 10 | 2 | alpha | 2026-01-15 |
| 2 | 20 | 4 | beta | 2026-03-31 |
| 3 | 30 | 6 | gamma | 2026-12-01 |
fx
=COLUMNS(A1:D3) 4