{"id":29082,"date":"2023-05-17T10:40:04","date_gmt":"2023-05-17T08:40:04","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=29082"},"modified":"2024-03-08T21:21:52","modified_gmt":"2024-03-08T20:21:52","slug":"how-to-use-the-if-else-function-in-microsoft-excel","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/how-to-use-the-if-else-function-in-microsoft-excel\/","title":{"rendered":"2 Best Ways to Use the IF ELSE Function in Excel (Examples)"},"content":{"rendered":"<p><em><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/52767971-AA22-4BF6-814A-5F8D91772046.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-29083 size-large\" title=\"How to Use the IF ELSE Function in Microsoft Excel\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/52767971-AA22-4BF6-814A-5F8D91772046-1024x576.png\" alt=\"How to Use the IF ELSE Function in Microsoft Excel\" width=\"1024\" height=\"576\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/52767971-AA22-4BF6-814A-5F8D91772046-1024x576.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/52767971-AA22-4BF6-814A-5F8D91772046-300x169.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/52767971-AA22-4BF6-814A-5F8D91772046-768x432.png 768w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/52767971-AA22-4BF6-814A-5F8D91772046.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/em><br \/>\nIn this article, we will be looking at how to use the IF ELSE function in Excel. The IF ELSE function is used to test a condition. One value is returned if the condition is <strong>TRUE<\/strong>, and another if the condition is <strong>FALSE<\/strong>.<\/p>\n<p>This function is most commonly used to automate decision-making processes in <a class=\"wpil_keyword_link\" title=\"spreadsheets\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/free-excel-templates-and-spreadsheets\/\" target=\"_blank\" rel=\"noopener\" data-wpil-keyword-link=\"linked\">spreadsheets<\/a>. We will explore the 2 ways to use this formula:<\/p>\n<ul>\n<li><a href=\"#1\"><strong>Single IF<\/strong><\/a><\/li>\n<li><a href=\"#2\"><strong>Multiple IFs<\/strong><\/a><\/li>\n<\/ul>\n<p>Let&#8217;s look at these methods thoroughly!<\/p>\n<p><strong>Download the Excel Workbook below to follow along and understand How to Use the IF ELSE Function in <a class=\"wpil_keyword_link\" title=\"Microsoft Excel\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/free-microsoft-excel-online-course\/\" target=\"_blank\" rel=\"noopener\" data-wpil-keyword-link=\"linked\">Microsoft Excel<\/a> &#8211;<\/strong><\/p>\n<h4><a class=\"IRPP_minimalist icon-download\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/IF-ELSE-function.xlsx\" target=\"_blank\"><span class=\"ctaText px-3 text-capitalize\"><strong>download excel workbook<\/strong><\/span><span class=\"postTitle px-3\">IF-ELSE-function.xlsx<\/span><\/a><\/h4>\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\/how-to-use-the-if-else-function-in-microsoft-excel\/#Single_IF\" title=\"Single IF\">Single IF<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/how-to-use-the-if-else-function-in-microsoft-excel\/#Multiple_IFs\" title=\"Multiple IFs\">Multiple IFs<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Single_IF\"><\/span><strong><span id=\"1\" style=\"color: #ff0000!important;\">Single IF<\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In the example shown below, we have a list of boats and their respective lengths. In order to know whether you need flares, a fire extinguisher, a flashlight, etc. on board, you will need to know the boat\u2019s classification.<\/p>\n<p>To keep things simple, we will introduce 2 boat classifications:<\/p>\n<p><strong>Class A: Less than 16 ft.<\/strong><br \/>\n<strong>Class 1: 16 ft. to less than 26 ft.<\/strong><\/p>\n<p>The IF function is returned like this:<\/p>\n<p><strong>=IF(test the condition, true result, false result)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/D4668D64-4680-49D0-9686-5765A091437A.jpeg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-29084\" title=\"How to Use the IF ELSE Function in Microsoft Excel\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/D4668D64-4680-49D0-9686-5765A091437A-1024x665.jpeg\" alt=\"How to Use the IF ELSE Function in Microsoft Excel\" width=\"1024\" height=\"665\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/D4668D64-4680-49D0-9686-5765A091437A-1024x665.jpeg 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/D4668D64-4680-49D0-9686-5765A091437A-300x195.jpeg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/D4668D64-4680-49D0-9686-5765A091437A-768x499.jpeg 768w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/D4668D64-4680-49D0-9686-5765A091437A.jpeg 1108w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><br \/>\nIn this example, we need to test cells in column B to identify their classification.<\/p>\n<p>The formula we will be using in cell C2 is:<br \/>\n<strong>=IF(B2&lt;16,\u201dClass A\u201d,\u201dClass 1\u201d)<\/strong><\/p>\n<p>This means that if B2 is less than 16 feet, return it with Class A, otherwise, it would be Class 1.<\/p>\n<p><strong>Copy<\/strong> the same formula and apply it the rest of the rows by dragging it down.<br \/>\n<a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/7C4F5B6B-5B95-48DE-B56F-F1ACA6C18C3A.jpeg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-29085\" title=\"How to Use the IF ELSE Function in Microsoft Excel\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/7C4F5B6B-5B95-48DE-B56F-F1ACA6C18C3A-1024x673.jpeg\" alt=\"How to Use the IF ELSE Function in Microsoft Excel\" width=\"1024\" height=\"673\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/7C4F5B6B-5B95-48DE-B56F-F1ACA6C18C3A-1024x673.jpeg 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/7C4F5B6B-5B95-48DE-B56F-F1ACA6C18C3A-300x197.jpeg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/7C4F5B6B-5B95-48DE-B56F-F1ACA6C18C3A-768x505.jpeg 768w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/7C4F5B6B-5B95-48DE-B56F-F1ACA6C18C3A.jpeg 1096w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Multiple_IFs\"><\/span><strong><span id=\"2\" style=\"color: #ff0000!important;\">Multiple IFs<\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The previous example can easily classify the boats if there are only two conditions. But what if there are more than two classifications?<\/p>\n<p>This is the complete list of classification for recreational boats in the US:<\/p>\n<p><strong>Class A: Less than 16 ft.<\/strong><br \/>\n<strong>Class 1: 16 ft. to less than 26 ft.<\/strong><br \/>\n<strong>Class 2: 26 ft. to less than 40 ft.<\/strong><br \/>\n<strong>Class 3: 40 ft. to less than 65 ft.<\/strong><\/p>\n<p>The formula will look like this:<\/p>\n<p><strong>=IF(B2&lt;16,\u201dClass A\u201d,IF(B2&lt;26,\u201dClass 1\u201d,IF(B2&lt;40,\u201dClass 2\u201d,IF(B2&lt;65,\u201dClass 3\u201d))))<\/strong><br \/>\n<a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/703349E1-C716-435A-BD2D-22ECB0ECC241.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-29086\" title=\"How to Use the IF ELSE Function in Microsoft Excel\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/703349E1-C716-435A-BD2D-22ECB0ECC241-1024x576.png\" alt=\"How to Use the IF ELSE Function in Microsoft Excel\" width=\"1024\" height=\"576\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/703349E1-C716-435A-BD2D-22ECB0ECC241-1024x576.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/703349E1-C716-435A-BD2D-22ECB0ECC241-300x169.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/703349E1-C716-435A-BD2D-22ECB0ECC241-768x432.png 768w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/05\/703349E1-C716-435A-BD2D-22ECB0ECC241.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><br \/>\nCopy the formula from B2 to the rest of the rows by highlighting it and dragging down.<\/p>\n<p>As you can see, once the formula is applied, the boats will automatically be identified in their respective classes.<\/p>\n<p>There you have it! Hopefully, you can utilize this simple, but effective formula in your next project!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will be looking at how to use the IF ELSE function in Excel. The IF ELSE function is used to test a condition. One value is returned if the condition is TRUE, and another if the condition is FALSE. This function is most commonly used to automate decision-making processes in spreadsheets. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":29083,"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":[3,283,927],"tags":[1214,43,1234,1233,1135,62],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/29082"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=29082"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/29082\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/29083"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=29082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=29082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=29082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}