COLUMNS

MS Excel Spreadsheet

See Also

Returns the number of columns in an array or reference.

Syntax

COLUMNS(array)

Array    is an array or array formula, or a reference to a range of cells for which you want the number of columns.

Example

The example may be easier to understand if you copy it to a blank spreadsheet.

ShowHow?

Formula Description (Result)
=COLUMNS(C1:E4) Number of columns in the reference (3)
=COLUMNS({1,2,3;4,5,6}) Number of columns in the array constant (3)