Difference between revisions of "Documentation/How Tos/Calc: CHOOSE function"
From Apache OpenOffice Wiki
< Documentation | How Tos
Javier Lopez (talk | contribs) |
m |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{DISPLAYTITLE:CHOOSE function}} |
− | + | {{Documentation/CalcFunc SpreadsheetTOC | |
− | + | |ShowPrevNext=block | |
− | + | |PrevPage=Documentation/How_Tos/Calc:_ADDRESS_function | |
− | | | + | |NextPage=Documentation/How_Tos/Calc:_HLOOKUP_function |
− | + | }}__NOTOC__ | |
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
== CHOOSE == | == CHOOSE == | ||
Line 63: | Line 32: | ||
: returns <tt>'''3'''</tt>, the square root of 9. | : returns <tt>'''3'''</tt>, the square root of 9. | ||
− | {{ | + | {{SeeAlso|EN| |
* [[Documentation/How_Tos/Calc: HLOOKUP function|HLOOKUP]] | * [[Documentation/How_Tos/Calc: HLOOKUP function|HLOOKUP]] | ||
* [[Documentation/How_Tos/Calc: INDEX function|INDEX]] | * [[Documentation/How_Tos/Calc: INDEX function|INDEX]] |
Latest revision as of 11:02, 2 February 2024
Spreadsheet Lookup functions
Spreadsheet Information functions
Other functions
< {{#switch:Previous Page | Previous Section = Previous Section | Next Section = Next Section | Previous Page = Previous Page | Next Page = Next Page | }} | {{#switch:Next Page | Previous Section = Previous Section | Next Section = Next Section | Previous Page = Previous Page | Next Page = Next Page | }} > |
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.
{{#switch:EN
| RU = Смотрите также:
| UA = Дивіться також:
| EN = See Also
| PT = Ver também
| #default = See Also
}}