Difference between revisions of "Documentation/How Tos/Calc: COLUMNS function"
From Apache OpenOffice Wiki
< Documentation | How Tos
Javier Lopez (Talk | contribs) |
Javier Lopez (Talk | contribs) |
||
Line 3: | Line 3: | ||
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div> | |booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div> | ||
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Spreadsheet_functions|<div style="font-size: 140%;">Spreadsheet Functions]] | |ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Spreadsheet_functions|<div style="font-size: 140%;">Spreadsheet Functions]] | ||
− | |ShowNextPage=block|NextPage=Documentation/How_Tos/Calc: | + | |ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_ERRORTYPE_function |
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_COLUMN_function | |ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_COLUMN_function | ||
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Number_Conversion_functions | |ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Number_Conversion_functions |
Revision as of 19:14, 1 June 2013
CALC FUNCTIONS
- Spreadsheet FunctionsSpreadsheet Lookup functions
- AddressChooseHlookupIndexIndirectLookupMathOffsetVlookupSpreadsheet Information functions
- AreasColumnColumnsErrortypeInfoRowRowsSheetSheetsOther functions
-
Contents
COLUMNS
Returns the number of columns in a given reference.
Syntax:
COLUMNS(reference)
- reference may be given either explicitly (eg A3:B5) or by name (eg myref).
- It is possible to define a name to represent more than one range (eg by entering $A$1:$A$3;$C$1:$C$4 in the Assigned To box of the Insert - Names - Define... dialog). In this case COLUMNS sums the number of columns in each range, irrespective of any duplication of columns.
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).
COLUMNS(myref)
- where myref has been defined as the multiple range $A$1:$A$3;$C$1:$D$4, returns 3.
-