Documentation/How Tos/Calc: COLUMNS function
From Apache OpenOffice Wiki
COLUMNS
Returns the number of columns in a given range.
Syntax:
COLUMNS(range)
- range is a range of cells, given either explicitly (A3:B5) or by name (myrangename) if a range name has been defined.
Example:
COLUMNS(A3:B5)
- returns 2; there are two columns in this range, namely columns A and B.
COLUMNS(G4:H4)
- returns 2; there are two columns in this range, namely columns G and H.
COLUMNS(D8)
- returns 1; D8 is interpreted as a one cell range, with a single column (column D).