Difference between revisions of "Manuals/calci/CHOOSE"
Jump to navigation
Jump to search
| Line 49: | Line 49: | ||
|} | |} | ||
| − | =CHOOSE(5,A1,A2,A3,A4,A5) : Finds the value with index number '5' in the cell range A1 to A5. Displays '''Orange'''. | + | =CHOOSE(5,A1,A2,A3,A4,A5) : Finds the value with index number '5' in the cell range A1 to A5. <br>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(2,A1,A2,A3,A4,A5) : Finds the value with index number '2' in the cell range A1 to A5. <br>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(4,B1,B2,B3,B4,B5) : Finds the value with index number '4' in the cell range B1 to B5. <br>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. | + | =CHOOSE(10,B1,B2,B3,B4) : Specified index number '10' is greater than the cell range, hence <br>Calci displays '''#N/A''' error message. |
| + | |||
| + | ==Related Videos== | ||
| + | |||
| + | {{#ev:youtube|Ygdn7H0rw8U|280|center|CHOOSE}} | ||
== See Also == | == See Also == | ||
Revision as of 14:16, 8 May 2015
CHOOSE(indexnum, val1, val2, .....)
where,
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle indexnum} the relative position of value to be selected
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle val1, val2, ...} 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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle indexnum} . e.g. If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle indexnum} is 2, Calci displays Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle val2} .
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle indexnum} is not an integer, Calci displays #NULL error message.
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle indexnum} <1 or Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle indexnum} > number of values in the list, Calci displays #N/A error message.
- Arguments Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle val1, val2, ...} 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.