Difference between revisions of "Manuals/calci/CHOOSE"
Jump to navigation
Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''CHOOSE'''</font></font></font><font color="#4848...") |
|||
Line 1: | Line 1: | ||
− | + | =CHOOSE(indexnum, val1, val2, .....)= | |
− | + | where, | |
+ | *<math>indexnum</math> the relative position of value to be selected | ||
+ | *<math>val1, val2, ...</math> are value arguments or cell references to the values | ||
− | + | CHOOSE() selects a value from list of arguments with respect to the specified index position. | |
− | + | == Description == | |
− | + | CHOOSE(indexnum, val1, val2, .....) | |
− | |||
− | |||
− | |||
− | |||
− | CHOOSE | + | e.g. CHOOSE(2,10,20,30) displays '''20''' as a result. |
− | </ | + | *CHOOSE() selects the value from the list of values depending on the specified <math>indexnum</math>. e.g. If <math>indexnum</math> is 2, Calci displays <math>val2</math>. |
− | + | *If <math>indexnum</math> is not an integer, Calci displays #NULL error message. | |
− | < | + | *If <math>indexnum</math> <1 or <math>indexnum</math> > number of values in the list, Calci displays #N/A error message. |
+ | *Arguments <math>val1, val2, ...</math> can be numbers, text, cell references, formulas, functions etc. | ||
− | + | == Examples == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div id="2SpaceContent" class="zcontent" align="left"> | <div id="2SpaceContent" class="zcontent" align="left"> | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
+ | | class="sshl_f" |Red | ||
+ | | class=" " |23 | ||
| class=" " | | | class=" " | | ||
− | + | ||
− | |||
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="sshl_f" |Blue |
− | + | | class=" " |12 | |
− | |||
− | | class=" " | | ||
| class=" " | | | class=" " | | ||
+ | |||
|- class="even" | |- class="even" | ||
− | | class=" | + | | class="sshl_f" |Yellow |
− | + | | class=" " |3 | |
− | |||
− | | class=" " | | ||
| class=" " | | | class=" " | | ||
+ | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" |Green | |
− | + | | class=" " |-1 | |
− | | class=" " | | ||
− | | class=" " | | ||
| class=" " | | | class=" " | | ||
+ | |||
|- class="even" | |- class="even" | ||
− | | | + | | class="sshl_f" |Orange |
− | | class=" | + | | class=" " |4 |
| class=" " | | | class=" " | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | + | =CHOOSE(5,A1,A2,A3,A4,A5) : Finds the value with index number '5' in the cell range A1 to A5. Displays '''Orange'''. | |
− | + | =CHOOSE(2,A1,A2,A3,A4,A5) : Finds the value with index number '2' in the cell range A1 to A5. Displays '''Blue'''. | |
+ | =CHOOSE(4,B1,B2,B3,B4,B5) : Finds the value with index number '4' in the cell range B1 to B5. Displays '''-1'''. | ||
+ | =CHOOSE(10,B1,B2,B3,B4) : Specified index number '10' is greater than the cell range, hence Calci displays '''#N/A''' error message. | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | *[[Manuals/calci/MATCH | MATCH]] | ||
+ | *[[Manuals/calci/LOOKUP | LOOKUP]] | ||
+ | *[[Manuals/calci/VLOOKUP | VLOOKUP]] | ||
+ | *[[Manuals/calci/HLOOKUP | HLOOKUP]] | ||
+ | |||
+ | == References == | ||
+ | |||
+ | *[http://en.wikipedia.org/wiki/String_(computer_science) String] | ||
+ | *[http://en.wikipedia.org/wiki/Comparison_of_programming_languages_(string_functions)#Find Find String] |
Revision as of 15:36, 15 January 2014
CHOOSE(indexnum, val1, val2, .....)
where,
- the relative position of value to be selected
- are value arguments or cell references to the values
CHOOSE() selects a value from list of arguments with respect to the specified index position.
Description
CHOOSE(indexnum, val1, val2, .....)
e.g. CHOOSE(2,10,20,30) displays 20 as a result.
- CHOOSE() selects the value from the list of values depending on the specified . e.g. If is 2, Calci displays .
- If is not an integer, Calci displays #NULL error message.
- If <1 or > number of values in the list, Calci displays #N/A error message.
- Arguments can be numbers, text, cell references, formulas, functions etc.
Examples
Red | 23 | |
Blue | 12 | |
Yellow | 3 | |
Green | -1 | |
Orange | 4 |
=CHOOSE(5,A1,A2,A3,A4,A5) : Finds the value with index number '5' in the cell range A1 to A5. Displays Orange. =CHOOSE(2,A1,A2,A3,A4,A5) : Finds the value with index number '2' in the cell range A1 to A5. Displays Blue. =CHOOSE(4,B1,B2,B3,B4,B5) : Finds the value with index number '4' in the cell range B1 to B5. Displays -1. =CHOOSE(10,B1,B2,B3,B4) : Specified index number '10' is greater than the cell range, hence Calci displays #N/A error message.