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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
Line 1: Line 1:
{{Documentation/MasterTOC
+
{{DISPLAYTITLE:CHOOSE function}}
|bookid=1234'''
+
{{Documentation/CalcFunc SpreadsheetTOC
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div>
+
|ShowPrevNext=block
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Spreadsheet_functions|<div style="font-size: 140%;">Spreadsheet Functions]]
+
|PrevPage=Documentation/How_Tos/Calc:_ADDRESS_functions
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_HLOOKUP_function
+
|NextPage=Documentation/How_Tos/Calc:_HLOOKUP_function
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_ADDRESS_function
+
}}__NOTOC__
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Number_Conversion_functions
+
|ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Statistical_functions
+
|toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div>
+
 
+
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Spreadsheet Lookup functions</div>
+
* [[Documentation/How_Tos/Calc:_ADDRESS_function|<div style="font-size: 120%;">Address]]
+
* [[Documentation/How_Tos/Calc:_CHOOSE_function|<div style="font-size: 120%; border-style: double; border-color:#778899;">Choose]]
+
* [[Documentation/How_Tos/Calc:_HLOOKUP_function|<div style="font-size: 120%;">Hlookup]]
+
* [[Documentation/How_Tos/Calc:_INDEX_function|<div style="font-size: 120%;">Index]]
+
* [[Documentation/How_Tos/Calc:_INDIRECT_function|<div style="font-size: 120%;">Indirect]]
+
* [[Documentation/How_Tos/Calc:_LOOKUP_function|<div style="font-size: 120%;">Lookup]]
+
* [[Documentation/How_Tos/Calc:_MATCH_function|<div style="font-size: 120%;">Math]]
+
* [[Documentation/How_Tos/Calc:_OFFSET_function|<div style="font-size: 120%;">Offset]]
+
* [[Documentation/How_Tos/Calc:_VLOOKUP_function|<div style="font-size: 120%;">Vlookup]]
+
 
+
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Spreadsheet Information functions</div>
+
* [[Documentation/How_Tos/Calc:_AREAS_function|<div style="font-size: 120%;">Areas]]
+
* [[Documentation/How_Tos/Calc:_COLUMN_function|<div style="font-size: 120%;">Column]]
+
* [[Documentation/How_Tos/Calc:_COLUMNS_function|<div style="font-size: 120%;">Columns]]
+
* [[Documentation/How_Tos/Calc:_ERRORTYPE_function|<div style="font-size: 120%;">Errortype]]
+
* [[Documentation/How_Tos/Calc:_INFO_function|<div style="font-size: 120%;">Info]]
+
* [[Documentation/How_Tos/Calc:_ROW_function|<div style="font-size: 120%;">Row]]
+
* [[Documentation/How_Tos/Calc:_ROWS_function|<div style="font-size: 120%;">Rows]]
+
* [[Documentation/How_Tos/Calc:_SHEET_function|<div style="font-size: 120%;">Sheet]]
+
* [[Documentation/How_Tos/Calc:_SHEETS_function|<div style="font-size: 120%;">Sheets]]
+
 
+
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Other functions</div>
+
* [[Documentation/How_Tos/Calc:_DDE_function|<div style="font-size: 120%;">Dde]]
+
* [[Documentation/How_Tos/Calc:_HYPERLINK_function|<div style="font-size: 120%;">Hyperlink]]
+
* [[Documentation/How_Tos/Calc:_STYLE_function|<div style="font-size: 120%;">Style]]
+
}}__TOC__
+
  
 
== CHOOSE  ==
 
== CHOOSE  ==

Revision as of 10:53, 2 February 2024



CHOOSE

Returns a value from a list, given an index number.

Syntax:

CHOOSE(index; value1; value2; ... value30)

value1 ... value30 are up to 30 values, each of which may be text, a number, a logical value, a reference or a formula.
index is an index number specifying which of value1 ... value30 to return; 1 returns value1, 2 returns value2, etc.

Example:

CHOOSE(1; "dog";"cat")

returns the text dog.

CHOOSE(2; "dog"; 65.4)

returns the number 65.4.

CHOOSE(3; "dog"; 65.4; B5)

returns the reference B5, so that =CHOOSE(3; "dog"; 65.4; B5) in a cell shows the contents of cell B5 in that cell (it is equivalent to =B5).

SUM(CHOOSE(1; B4:B5; B6))

returns the sum of the numbers in the range B4:B5.

CHOOSE(2;SUM(B1:C1);SQRT(9))

returns 3, the square root of 9.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_CHOOSE_function&oldid=259975"
Views
Personal tools
Navigation
Print/export
Tools