Difference between revisions of "Manuals/calci/CHOOSE"

From ZCubes Wiki
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...")
 
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''CHOOSE'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">(</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''i_num'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''val1'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,val2,...)</font></font></font>
+
<div style="font-size:30px">'''CHOOSE () '''</div><br/>
 +
where,
 +
*First Parameter is the relative position of value to be selected
 +
*From the second parameter are value arguments or cell references to the values
 +
**CHOOSE(), chooses a value from a list of values.
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''where i_num'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">  specifies which value argument is selected and i_num should be a number between 1 and 29.</font></font></font>
+
== Description ==
  
* <font color="#484848"><font face="Arial, sans-serif"><font size="2">When i_num is 1, CHOOSE gives value1and when it is 2, CHOOSE gives value 2; and so on.</font></font></font>
+
CHOOSE()
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''val1,val2,...'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">   are the value arguments .</font></font></font>
+
e.g. CHOOSE(2,10,20,30) displays '''20''' as a result.
  
</div>
+
*CHOOSE() selects the value from the list of values depending on the specified in the first parameter. e.g. If first parameter is 2, Calci displays in the second parameter.
----
+
*If the first parameter is not an integer, Calci displays #NULL error message.
<div id="1SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">It calculates a value from the list of value arguments. </font></font></font></div>
+
*If the first parameter &lt;1 or the first parameter &gt; number of values in the list, Calci displays #N/A error message.
----
+
*Arguments from the second parameter can be numbers, text, cell references, formulas, functions etc.
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
  
CHOOSE
+
== Examples ==
  
</div></div>
 
----
 
<div id="8SpaceContent" class="zcontent" align="left"> 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Let's see an example in Column1Row1 , Column1Row2,Column1Row3,Column1Row4</font></font></font>
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Red</font></font></font>
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Green</font></font></font>
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Yellow</font></font></font>
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Blue</font></font></font>
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">I.e =CHOOSE(2,C1R1,C1R2,C1R3,C1R4) is green</font></font></font>
 
 
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
 
<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=" " |
| Column1
+
 
| Column2
 
| Column3
 
| Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| class="sshl_f" |Blue
| class=" " | Red
+
| class=" " |12
| class="                                                                                                                                                " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 +
 
|- class="even"
 
|- class="even"
| class=" " | Row2
+
| class="sshl_f" |Yellow
| class=" " | Green
+
| class=" " |3
| class=" " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 +
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" |Green
| class=" " | Yellow
+
| class=" " |-1
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row4
 
| class="sshl_f " | Blue
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="odd"
 
| class=" " | Row5
 
| class="sshl_f" | Green
 
| class=" " |
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 +
 
|- class="even"
 
|- class="even"
| Row6
+
| class="sshl_f" |Orange
| class="     " |
+
| class=" " |4
| class=" " |
 
 
| class=" " |
 
| class=" " |
| class="  SelectTD  SelectTD" |
 
<div id="2Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
=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. <br>Displays '''Blue'''.
 +
=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 <br>Calci displays '''#N/A''' error message.
 +
 
 +
==Related Videos==
 +
 
 +
{{#ev:youtube|Ygdn7H0rw8U|280|center|CHOOSE}}
 +
 
 +
== 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]
 +
 
 +
 
 +
 
 +
 
 +
*[[Z_API_Functions | List of Main Z Functions]]
 +
 
 +
*[[ Z3 |  Z3 home ]]

Latest revision as of 13:53, 24 August 2018

CHOOSE ()


where,

  • First Parameter is the relative position of value to be selected
  • From the second parameter are value arguments or cell references to the values
    • CHOOSE(), chooses a value from a list of values.

Description

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 in the first parameter. e.g. If first parameter is 2, Calci displays in the second parameter.
  • If the first parameter is not an integer, Calci displays #NULL error message.
  • If the first parameter <1 or the first parameter > number of values in the list, Calci displays #N/A error message.
  • Arguments from the second parameter 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.

Related Videos

CHOOSE

See Also

References