<p>The <b>SWITCH</b> function is one of the logical functions. It is used to evaluate one value (called the expression) against a list of values, and returns the result corresponding to the first matching value. If there is no match, an optional default value may be returned.</p>
<p>The <b>SWITCH</b> function syntax is:</p>
<pstyle="text-indent: 150px;"><b><em>SWITCH(expression, value1, result1 [, [default or value2] [, [result2]], ...[default or value3, result3]])</em></b></p>
<p><em>where</em></p>
<pstyle="text-indent: 50px;"><b><em>expression</em></b> is the value that will be compared against <b><em>value1 ...value126</em></b>.</p>
<pstyle="text-indent: 50px;"><b><em>value1 ...value126</em></b> is the value that will be compared against <b><em>expression</em></b>.</p>
<pstyle="text-indent: 50px;"><b><em>result1 ...result126</em></b> is the result to be returned if the <b><em>value1 ...value126</em></b> matches to the <b><em>expression</em></b>.</p>
<pstyle="text-indent: 50px;"><b><em>default</em></b> is the result to be returned if there are no matches. If the <b><em>default</em></b> argument is not specified and there are no matches, the function returns the #N/A error.</p>
<pclass="note"><b>Note</b>: you can enter up to <b>254</b> arguments i.e. up to 126 pairs of values and results.</p>
<p>To apply the <b>SWITCH</b> function,</p>
<ol>
<li>select the cell where you wish to display the result,</li>