# Learn How to Use Microsoft Excel SWITCH Function

Written by | 0 Comments | 793 Views

In this article, you will learn how to use the Microsoft Excel SWITCH function and its prime function in Microsoft Excel. You will also get to know the Microsoft Excel SWITCH function return value and syntax with the help of some examples. So, let's

## Microsoft Excel SWITCH Function

The prime use of the SWITCH function is to match multiple values and return the first TRUE match. That implies the Microsoft Excel SWITCH function one value against all the values provided in the list and return a result corresponding to the first match. The SWITCH function may return the optional default value when there is not any match.

### The SWITCH Function Return Value

The result is as per the first match.

### The SWITCH Function Syntax

=SWITCH (expression, val1/result1, [val2/result2], ..., [default])

Where:

• expression: This is the value or expression you want to match against.
• val1/result1: This is the first value and result pair.
• val2/result2: This is the second value and result pair, which is optional.
• Default: You can use the default value when no pair is matched; this is also optional.

## How to Use Microsoft Excel SWITCH Function?

As we know, the SWITCH function compares the value provided in the list and returns the result as per the first match. The SWITCH function can also be used when you want to perform the exact match with different possible results, and it will return the default value if no match is found.

The first argument in the SWITCH function is known as "expression," and that can be a cell reference or another formula that can return the specific value you match against the list. The matching value and corresponding results are entered in the pairs, and you can manage 126 pairs with the SWITCH function.