How to use the SWITCH function in Excel

How to use the SWITCH function in Excel


How to use the SWITCH function in Excel

Learn how to use the SWITCH function in Microsoft Excel. This tutorial demonstrates how to use Excel SWITCH with an easy to follow example.

SWITCH Function (and sample data):
https://www.techonthenet.com/excel/fo

Excel Tutorials:
https://www.techonthenet.com/excel/in

Don’t forget to subscribe to our channel for more great Excel tutorials!

Visit us at: https://www.techonthenet.com
or follow us on:

Facebook: https://www.facebook.com/techonthenetcom
Twitter: https://twitter.com/tech_on_the_net
Pinterest: https://www.pinterest.com/techonthene


Content

0.02 -> The SWITCH function is one of the Logical functions in Excel
5.04 -> The SWITCH function allows you to compare an expression to a list of values
9.44 -> and return the corresponding result
12.12 -> To illustrate how to use the SWITCH function, let's look at an example
16.88 -> Here we have a list of topics
19.6 -> Let's use the SWITCH function to return a specific website for each topic
24.08 -> To get started, let's begin by entering the SWITCH command
28 -> As you can see, the SWITCH function takes a series of parameters
33.7 -> The first parameter you must enter is the expression that you will compare to a list of values
39.48 -> In this example, let's enter A2 as our expression
44.06 -> Cell A2 contains the value "Minecraft"
49 -> The next parameters we will need to enter is a list of values and their corresponding result
55 -> Each of the values will be compared to the expression
58.26 -> and once the first value is found that matches the expression
62.28 -> the corresponding result will be returned
65.62 -> You can enter one or more of these result/value pairs
70 -> In this example, we will enter two pairs
73.52 -> For the first pair, we will enter "Excel" and "TechOnTheNet.com"
79.6 -> For the second pair, we will enter "Minecraft" and "DigMinecraft.com"
86.74 -> The third parameter is optional
88.901 -> It is the default value to return if the expression was not found in the previous list of values
96.04 -> In this example we will enter a default value of "Unknown"
100.44 -> Now that we have entered all of the parameters for the SWITCH function
105.02 -> let's complete the command to look at our result
108.22 -> You should see the value "DigMinecraft.com" appear in cell C2
113.16 -> This is the website that is paired with the topic of Minecraft
117.86 -> Now let's copy our formula into cell C3 and C4
121.52 -> Each of these cells now contain the corresponding SWITCH value for its topic
127.18 -> In cell C3, you should see the value "TechOnTheNet.com"
131.72 -> This is the value returned by the SWITCH function when the topic is Excel
137.38 -> and finally in cell C4, you should see the value "Unknown"
141.6 -> Since the topic "Weather" is not found in the list of values in the SWITCH function
146.24 -> the default value of "Unknown" is returned
150.66 -> This completes our example of how to use Excel's SWITCH function
155.08 -> If you would like to see more SWITCH examples
157.263 -> or would like to download the sample data we used for this tutorial
160.86 -> please visit our website at TechOnTheNet.com
164.72 -> If found our tutorial helpful, please leave a like on this video
168.52 -> and don't forget to subscribe to our YouTube channel for more great Excel tutorials

Source: https://www.youtube.com/watch?v=XB_egwfkB3I