Returns the number of columns in the given reference or array.
Returns a positive whole number ranging from 1 to 1024 which is the count of the columns in the given reference.
Array is the reference to a cell range whose total number of columns is to be found. The argument can also be a single cell.
- If Array is not a reference or a named area then the function returns an error value.
|=COLUMNS(B5)||Here a cell only contains one column.||1|
|=COLUMNS(A1:C5)||The reference comprises three columns.||3|
|=COLUMNS(Rabbit) if "Rabbit" is the named range (C1:D3)||The named area comprises two columns.||2|
Related LibreOffice functions:
Equivalent Excel functions: