Difference between revisions of "Documentation/How Tos/Calc: COLUMNS function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
((Syntax))
Line 7: Line 7:
 
<tt>'''COLUMNS(range)'''</tt>
 
<tt>'''COLUMNS(range)'''</tt>
  
: <tt>'''range'''</tt> is a range of cells.
+
: <tt>'''range'''</tt> is a range of cells, given either explicitly (<tt>'''A3:B5'''</tt>) or by name (<tt>'''myrangename'''</tt>) if a range name has been defined.
  
 
=== Example: ===
 
=== Example: ===

Revision as of 17:44, 25 January 2008


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).

See also:

ROWS, SHEETS

Information functions, Spreadsheet functions

Personal tools