{"id":10026,"date":"2019-05-31T11:38:57","date_gmt":"2019-05-31T09:38:57","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=10026"},"modified":"2024-03-20T01:21:10","modified_gmt":"2024-03-20T00:21:10","slug":"switch-formula-in-excel","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/switch-formula-in-excel\/","title":{"rendered":"SWITCH Formula in Excel"},"content":{"rendered":"<p>&nbsp;<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_57_1 counter-flat ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li><a href=\"#\" class=\"scroll-to-download\">Free Practice Workbook<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/switch-formula-in-excel\/#Want_to_know_How_To_Master_the_SWITCH_Function_in_Excel\" title=\"Want to know How To Master the SWITCH Function in Excel?\">Want to know How To Master the SWITCH Function in Excel?<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Want_to_know_How_To_Master_the_SWITCH_Function_in_Excel\"><\/span><em><strong>Want to know How To Master the SWITCH Function in Excel?<\/strong><\/em><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>*** Watch our video and step by step guide below with free downloadable Excel workbook to practice ***<\/p>\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/dwri-bDOjTg?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/p>\n<div>\n<div style=\"float: left;\"><span style=\"text-decoration: underline;\"><strong><a href=\"https:\/\/youtu.be\/dwri-bDOjTg\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Watch on YouTube<\/a> <\/strong><\/span>and give it a thumbs up &#x1f44d;<\/div>\n<div>\n<p><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-111468 size-full\" style=\"vertical-align: middle;\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p><em><strong>What does it do?<\/strong><\/em><\/p>\n<p>Matches multiple values and returns the first value that has a match<\/p>\n<p><em><strong>Formula breakdown:<\/strong><\/em><\/p>\n<p>=SWITCH(<span style=\"color: #0000ff;\">expression<\/span>, <span style=\"color: #ff6600;\">value1, result1<\/span>, <span style=\"color: #339966;\">[value2 \/ default, result2], &#8230;<\/span>)<\/p>\n<p><em><strong>What it means:<\/strong><\/em><\/p>\n<p>=SWITCH(<span style=\"color: #0000ff;\">value to check<\/span>, <span style=\"color: #ff6600;\">value to match against, result to return<\/span>, <span style=\"color: #339966;\">[succeeding values to match or the default value if nothing gets matched], &#8230;<\/span>)<\/p>\n<hr \/>\n<p>If you have multiple values to check, we can use\u00a0<strong>Excel&#8217;s SWITCH Formula!<\/strong> It allows us to specify multiple values to check, then the\u00a0<strong>SWITCH Formula<\/strong> will look for the first value that gets matched!<\/p>\n<p>Let us try it out on a simple ratings table (e.g. 1 = Bad, 2 = Average, 3 = Great), then we will create a\u00a0<strong>SWITCH Formula<\/strong> that will simulate the exact same logic of the table!<\/p>\n<p>I explain how you can do this below:<\/p>\n<div class=\"after-post-box\">\n<p class=\"line-two\"><a class=\"IRPP_minimalist icon-download button small\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA.xlsx\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA.xlsx\" data-leadbox-id=\"147284833f72a2:12f08263ab46dc\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<i class=\"fa fa-download\"><\/i><\/span><span class=\"postTitle px-3\">SWITCH-FORMULA.xlsx<\/span><\/a><\/p>\n<p class=\"line-two\">\n<\/div>\n<p><span style=\"color: #ff0000;\"><strong>STEP 1:<\/strong><\/span> We need to <strong>enter the <i>SWITCH\u00a0<\/i>function in a blank cell<\/strong>:<\/p>\n<h3><span style=\"color: #0000ff;\">=SWITCH(<\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"SWITCH Formula in Excel\"  class=\"aligncenter size-full wp-image-10367\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-01.jpg\" alt=\"SWITCH Formula in Excel\" width=\"884\" height=\"158\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-01.jpg 884w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-01-300x54.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-01-768x137.jpg 768w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 2:<\/strong><\/span>\u00a0The <b>SWITCH\u00a0<\/b>arguments:<\/p>\n<h3><span style=\"color: #0000ff;\"><em><strong>expression<\/strong><\/em><\/span><\/h3>\n<p><strong>What is the value to check?<\/strong><\/p>\n<p><em>Select the cell containing the rating that you want to translate to the correct description<\/em><\/p>\n<h3>=SWITCH(<span style=\"color: #0000ff;\">G8,\u00a0<\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"SWITCH Formula in Excel\"  class=\"aligncenter size-full wp-image-10368\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-02.jpg\" alt=\"SWITCH Formula in Excel\" width=\"979\" height=\"152\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-02.jpg 979w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-02-300x47.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-02-768x119.jpg 768w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/p>\n<h3><span style=\"color: #0000ff;\"><em><strong>value1, result1<\/strong><\/em><\/span><\/h3>\n<p><strong>What is the first lookup value and value to return if it is matched?<\/strong><\/p>\n<p><em>Let us start from the first value of the rating table. If the value is 1, then the description is &#8220;Bad&#8221;<\/em><\/p>\n<h3>=SWITCH(G8, <span style=\"color: #0000ff;\">1, &#8220;Bad&#8221;<\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"SWITCH Formula in Excel\"  class=\"aligncenter size-full wp-image-10369\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-03.jpg\" alt=\"SWITCH Formula in Excel\" width=\"871\" height=\"160\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-03.jpg 871w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-03-300x55.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-03-768x141.jpg 768w\" sizes=\"(max-width: 871px) 100vw, 871px\" \/><\/p>\n<h3><span style=\"color: #0000ff;\"><em><strong>value2, result2<\/strong><\/em><\/span><\/h3>\n<p><strong>What is the second lookup value and value to return if it is matched?<\/strong><\/p>\n<p><em>Let us start from the second value of the rating table. If the value is 2, then the description is &#8220;Average&#8221;<\/em><\/p>\n<h3>=SWITCH(G8, 1, &#8220;Bad&#8221;,<span style=\"color: #0000ff;\"> 2, &#8220;Average&#8221;,<\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"SWITCH Formula in Excel\"  class=\"aligncenter size-full wp-image-10370\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-04.jpg\" alt=\"SWITCH Formula in Excel\" width=\"942\" height=\"145\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-04.jpg 942w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-04-300x46.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-04-768x118.jpg 768w\" sizes=\"(max-width: 942px) 100vw, 942px\" \/><\/p>\n<h3><span style=\"color: #0000ff;\"><em><strong>value3, result3<\/strong><\/em><\/span><\/h3>\n<p><strong>What is the third lookup value and value to return if it is matched?<\/strong><\/p>\n<p><em>Let us start from the third value of the rating table. If the value is 3, then the description is &#8220;Great&#8221;<\/em><\/p>\n<h3>=SWITCH(G8, 1, &#8220;Bad&#8221;, 2, &#8220;Average&#8221;,<span style=\"color: #0000ff;\"> 3, &#8220;Great&#8221;,<\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"SWITCH Formula in Excel\"  class=\"aligncenter size-full wp-image-10371\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-05.jpg\" alt=\"SWITCH Formula in Excel\" width=\"1040\" height=\"156\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-05.jpg 1040w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-05-300x45.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-05-1024x154.jpg 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-05-768x115.jpg 768w\" sizes=\"(max-width: 1040px) 100vw, 1040px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><span style=\"color: #0000ff;\"><em><strong>default<\/strong><\/em><\/span><\/h3>\n<p><strong>What is the default value to return if nothing gets matched?<\/strong><\/p>\n<p><em>We want to show the value &#8220;Unknown&#8221;, if an unknown rating is specified.<\/em><\/p>\n<h3>=SWITCH(G8, 1, &#8220;Bad&#8221;, 2, &#8220;Average&#8221;, 3, &#8220;Great&#8221;, <span style=\"color: #0000ff;\">&#8220;Unknown&#8221;)<\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"SWITCH Formula in Excel\"  class=\"aligncenter size-full wp-image-10372\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-06.jpg\" alt=\"SWITCH Formula in Excel\" width=\"952\" height=\"148\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-06.jpg 952w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-06-300x47.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-06-768x119.jpg 768w\" sizes=\"(max-width: 952px) 100vw, 952px\" \/><\/p>\n<p>You now have your correct rating description!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"SWITCH Formula in Excel\"  class=\"aligncenter size-full wp-image-10373\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-07.jpg\" alt=\"SWITCH Formula in Excel\" width=\"610\" height=\"152\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-07.jpg 610w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-07-300x75.jpg 300w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>Let us try an unknown rating (40) and see the resulting description:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"SWITCH Formula in Excel\"  class=\"aligncenter size-full wp-image-10374\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-08.jpg\" alt=\"SWITCH Formula in Excel\" width=\"592\" height=\"157\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-08.jpg 592w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/11\/SWITCH-FORMULA-08-300x80.jpg 300w\" sizes=\"(max-width: 592px) 100vw, 592px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/ebooks.myexcelonline.com\/products\/101-most-popular-excel-formulas-e-book\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-10741\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/12\/MyExcelOnline.com-Formulas-E-Book.png\" alt=\"\" width=\"1200\" height=\"628\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/12\/MyExcelOnline.com-Formulas-E-Book.png 1200w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/12\/MyExcelOnline.com-Formulas-E-Book-300x157.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/12\/MyExcelOnline.com-Formulas-E-Book-1024x536.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2018\/12\/MyExcelOnline.com-Formulas-E-Book-768x402.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Want to know How To Master the SWITCH Function in Excel? *** Watch our video and step by step guide below with free downloadable Excel workbook to practice *** \ufeff Watch on YouTube and give it a thumbs up &#x1f44d; What does it do? Matches multiple values and returns the first value that has [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":15590,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[12,3,557],"tags":[142,512,558],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/10026"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=10026"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/10026\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/15590"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=10026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=10026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=10026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}