Excel Function : SWITCH

Download now!

Excel Function : SWITCH




Evaluates an 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.

Microsoft Excel Reference Page


Syntax and Description of the SWITCH Excel Function

example. The syntax in this example is the same as in the previous one, except for the addition of the second argument, which is the value or expression to be tested against. You can use the COUNTIF function to count the number of cells in a range that meet a criterion that you specify. Excel VBA If Statement – Syntax. It can be used as a worksheet function (WS) in Excel. Excel: How to use the IF function (WS, VBA) This Excel tutorial explains how to use the Excel IF function with syntax and examples. The syntax of the Excel COUNTIF function is as follows: COUNTIF ( range, criteria ) Range is the range of cells that you want to count. Excel V

About SWITCH Excel Function

The SWITCH function returns a value based on the index number. It's useful when you want to return a value from a list of values. The syntax for the SWITCH function is: =SWITCH(index_num, value1, result1, value2, result2, ...) index_num - The number of the value in the list that you want to return. value1 - The first value in the list. result1 - The result that you want to return if index_num is equal to value1. value2 - The second value in the list. result2 - The result that you want to return if index_num is