Difference between revisions of "Documentation/How Tos/Calc: COLUMNS function"
From Apache OpenOffice Wiki
< Documentation | How Tos
((Syntax)) |
m |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | __NOTOC__ | + | {{DISPLAYTITLE:COLUMNS function}} |
+ | {{Documentation/CalcFunc SpreadsheetTOC | ||
+ | |ShowPrevNext=block | ||
+ | |PrevPage=Documentation/How_Tos/Calc:_COLUMN_function | ||
+ | |NextPage=Documentation/How_Tos/Calc:_ERRORTYPE_function | ||
+ | }}__NOTOC__ | ||
== COLUMNS == | == COLUMNS == | ||
− | Returns the number of columns in a given | + | Returns the number of columns in a given reference. |
=== Syntax: === | === Syntax: === | ||
− | <tt>'''COLUMNS( | + | <tt>'''COLUMNS(reference)'''</tt> |
− | : <tt>''' | + | : <tt>'''reference'''</tt> may be given either explicitly (eg <tt>'''A3:B5'''</tt>) or by name (eg <tt>'''myref'''</tt>). |
+ | |||
+ | : It is possible to define a name to represent more than one range (eg by entering <tt>'''$A$1:$A$3;$C$1:$C$4'''</tt> in the '''Assigned To''' box of the '''Insert - Names - Define...''' dialog). In this case <tt>'''COLUMNS'''</tt> sums the number of columns in each range, irrespective of any duplication of columns. | ||
=== Example: === | === Example: === | ||
Line 19: | Line 26: | ||
: returns <tt>'''1'''</tt>; <tt>'''D8'''</tt> is interpreted as a one cell range, with a single column (column D). | : returns <tt>'''1'''</tt>; <tt>'''D8'''</tt> is interpreted as a one cell range, with a single column (column D). | ||
− | + | <tt>'''COLUMNS(myref)'''</tt> | |
− | '''[[Documentation/How_Tos/Calc: ROWS function|ROWS]] | + | : where <tt>'''myref'''</tt> has been defined as the multiple range <tt>'''$A$1:$A$3;$C$1:$D$4'''</tt>, returns <tt>'''3'''</tt>. |
− | + | ||
+ | {{SeeAlso|EN| | ||
+ | * [[Documentation/How_Tos/Calc: ROWS function|ROWS]] | ||
+ | * [[Documentation/How_Tos/Calc: SHEETS function|SHEETS]] | ||
+ | * [[Documentation/How_Tos/Calc: AREAS function|AREAS]] | ||
+ | |||
+ | * [[Documentation/How_Tos/Calc: Information functions|Information functions]] | ||
+ | * [[Documentation/How_Tos/Calc: Spreadsheet functions|Spreadsheet functions]] | ||
− | + | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | |
− | + | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | |
+ | [[Category: Documentation/Reference/Calc/Spreadsheet functions]] |