COLUMNS
Returns the number of columns in a reference.
Lookup & ReferenceLookup & Matching Essentials
What it does
Counts the number of columns in an array or reference.
Syntax
COLUMNS(array)
Arguments
array(reference) β An array or reference.
Examples
Count Columns
Count columns in A1:C5.
FORMULA
=COLUMNS(A1:C5)
RESULT
3
SAMPLE DATA
| A | B | C | |
|---|---|---|---|
| 1 | Col1 | Col2 | Col3 |
| 2 | 1 | 2 | 3 |