Documentation/Calc Functions/COLUMNS

From The Document Foundation Wiki
Jump to navigation Jump to search


Function name:

COLUMNS

Category:

Spreadsheet

Summary:

Returns the number of columns in the given reference or array.

Syntax:

COLUMNS(Array)

Returns:

Returns a positive whole number ranging from 1 to 1024 which is the count of the columns in the given reference.

Arguments:

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.

Additional details:

None

Examples:

Formula Description Returns
=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:

ROWS

SHEETS

ODF standard:

Section 6.13.5, part 2

Equivalent Excel functions:

COLUMNS