Purpose
Get the number of columns in an array or reference.
Return value
A number representing column count.
Syntax
=COLUMNS (array)
Arguments
- array – A reference to a range of cells.
Usage notes
Use the COLUMNS function to get the number of columns in a reference. For example, the formula =COLUMNS(A1:F1) returns the number 6.
Array can be an array, an array formula, or a reference to a single contiguous group of cells.