{"id":29719,"date":"2023-07-03T00:24:12","date_gmt":"2023-07-02T22:24:12","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=29719"},"modified":"2024-04-14T14:41:18","modified_gmt":"2024-04-14T12:41:18","slug":"iferror-function-in-excel","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/iferror-function-in-excel\/","title":{"rendered":"2 Useful Examples of IFERROR Function in Excel &#8211; A Beginner&#8217;s Guide"},"content":{"rendered":"<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/07\/B77612EE-1827-4E22-A130-9C1080022918.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-29742\" title=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/07\/B77612EE-1827-4E22-A130-9C1080022918-1024x576.png\" alt=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" width=\"1024\" height=\"576\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/07\/B77612EE-1827-4E22-A130-9C1080022918-1024x576.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/07\/B77612EE-1827-4E22-A130-9C1080022918-300x169.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/07\/B77612EE-1827-4E22-A130-9C1080022918-768x432.png 768w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/07\/B77612EE-1827-4E22-A130-9C1080022918.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a>Excel is a potent and robust tool when working with an<strong> extensive dataset for calculation and analysis<\/strong>. However, it&#8217;s<strong> inevitable to encounter errors<\/strong> during such data processing. This is precisely where the <strong>IFERROR<\/strong> function in Excel proves to be helpful.<\/p>\n<p>IFERROR function <strong>displays a custom message<\/strong> when a function&#8217;s output is an error.<\/p>\n<p>In this article, we will be covering the following topics in detail &#8211;<\/p>\n<p>Now, let&#8217;s explore each of these topics individually!<\/p>\n<h4>Download the Excel Workbook below to follow along and understand how to use the IFERROR function in Excel \u2013<br \/>\n<a class=\"IRPP_minimalist icon-download\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-Function-in-Excel.xlsx\" target=\"_blank\"><span class=\"ctaText px-3 text-capitalize\"><strong>download excel workbook<\/strong><\/span><span class=\"postTitle px-3\">IFERROR-Function-in-Excel.xlsx<\/span><\/a><\/h4>\n<p>&nbsp;<\/p>\n<p><strong><span id=\"1\" style=\"color: #ff0000\">Introduction<\/span><\/strong><\/p>\n<p>The IFERROR function in Excel<strong> allows you to specify a value to be returned if a <a class=\"wpil_keyword_link\" title=\"formula\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/top-excel-formulas-function-examples-to-get-better-at-microsoft-excel\/\" target=\"_blank\" rel=\"noopener\" data-wpil-keyword-link=\"linked\">formula<\/a> encounters an error<\/strong>. If you have a <strong>calculation that results in an error<\/strong> like, #N\/A, #VALUE!, #REF!, #DIV\/0!, #NUM!, #NAME?, then you can<strong> <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/category\/formulas\/text\/clean\/\" target=\"_blank\" rel=\"noopener\">clean it up by using<\/a> the<\/strong> <strong>IFERROR<\/strong>\u00a0function which allows you to <strong>replace the error it with a 0 or a blank cell or a custom message<\/strong>.<\/p>\n<p>The <strong>syntax<\/strong> of the <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/category\/formulas\/logical\/iferror\/\" target=\"_blank\" rel=\"noopener\">IFERROR function in Excel<\/a> is &#8211;<\/p>\n<p>=IFERROR(value,value_if_error)<\/p>\n<ul>\n<li><strong>value<\/strong> &#8211; The formula you want to evaluate.<\/li>\n<li><strong>value_if_error<\/strong> &#8211; The value you want to display if the evaluated formula results in an error.<\/li>\n<\/ul>\n<p>If the formula result is not an error, the function will simply display the formula&#8217;s result itself.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span id=\"2\" style=\"color: #ff0000\">Types of Errors<\/span><\/strong><\/p>\n<p>Below are the different types of errors that you can face when working on Excel &#8211;<\/p>\n<ul>\n<li><strong>#REF!<\/strong> &#8211; Excel will display #REF! error when the cell that is referenced in a formula<strong>\u00a0does not exist<\/strong>\u00a0or\u00a0<strong>is invalid<\/strong>.<\/li>\n<li><strong>#VALUE!<\/strong> &#8211; Excel displays an #VALUE! error when the <strong>variable provided in the formula is not a supported type<\/strong>.<\/li>\n<li><strong>#DIV\/0!<\/strong> &#8211; This error in Excel occurs when you attempt to<strong>\u00a0divide a number<\/strong>\u00a0with\u00a0<strong>zero<\/strong>, any value\u00a0<strong>equivalent to zero,<\/strong>\u00a0or a\u00a0<strong>blank cell<\/strong>.<\/li>\n<li><strong>#NULL!<\/strong> &#8211; This error occurs when the <strong>range provided in the formula is not valid<\/strong>\u00a0and you have provided an\u00a0<strong>incorrect character instead of the required character<\/strong>\u00a0in the range.<\/li>\n<li><strong>#SPILL!<\/strong> &#8211; When the formula cannot populate all the cells it is supposed to, the first cell where the formula is entered shows the <b>#SPILL!\u00a0<\/b>Error.<\/li>\n<li><strong>#NAME?<\/strong> &#8211; It occurs when there is a spelling error in<strong> the formula name, c<\/strong><strong>ell range, or <\/strong><strong>named range or when text is entered without quotes<\/strong>.<\/li>\n<li><strong>#NUM!<\/strong> &#8211; Error when<strong>\u00a0values in formulas are invalid<\/strong>. It basically means that the\u00a0<strong>calculation cannot be performed due to limitations or errors<\/strong>.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong><span id=\"3\" style=\"color: #ff0000\">Example 1 &#8211; Division Error<\/span><\/strong><\/p>\n<p>In this example, we have to calculate the <strong>average sale of each record <\/strong>by dividing the total sales amount by the units sold. However, when Excel attempts to divide 0 by 0, an error will be returned.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-3.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29726\" title=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-3.png\" alt=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" width=\"600\" height=\"594\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-3.png 676w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-3-300x297.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-3-150x150.png 150w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>So, we need to <strong>handle division by zero errors gracefully<\/strong>.<\/p>\n<p><strong><span style=\"color: #ff0000\">STEP 1:<\/span><\/strong> Enter the <strong>IFERROR<\/strong> function in a blank cell.<\/p>\n<p><strong>=IFERROR(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-4.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29727\" title=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-4.png\" alt=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" width=\"591\" height=\"505\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-4.png 719w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-4-300x257.png 300w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/a><\/p>\n<p><strong><span style=\"color: #ff0000\">STEP 2:<\/span><\/strong> Enter the <strong>first argument &#8211; value<\/strong>. Here, we need to enter the <strong>formula first to calculate the average sale<\/strong>.<\/p>\n<p><strong>=IFERROR(C2\/D2,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-5.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29728\" title=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-5.png\" alt=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" width=\"548\" height=\"505\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-5.png 670w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-5-300x276.png 300w\" sizes=\"(max-width: 548px) 100vw, 548px\" \/><\/a><\/p>\n<p><strong><span style=\"color: #ff0000\">STEP 3:<\/span> <\/strong>\u00a0Enter the <strong>second argument &#8211; value_if_error<\/strong>. Here, we want \u201c<strong>0<\/strong>\u201d to be displayed if there is an error.<\/p>\n<p><strong>=IFERROR(C2\/D2,0)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-6.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29729\" title=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-6.png\" alt=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" width=\"528\" height=\"521\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-6.png 642w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-6-300x296.png 300w\" sizes=\"(max-width: 528px) 100vw, 528px\" \/><\/a><\/p>\n<p>Apply the<strong> same formula to the rest of the cells by dragging the lower right corner downwards<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-7.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29730\" title=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-7.png\" alt=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" width=\"522\" height=\"527\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-7.png 617w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-7-297x300.png 297w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-7-150x150.png 150w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p>You now have all of the results!<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span id=\"4\" style=\"color: #ff0000\">Example 2 &#8211; Missing Data<\/span><\/strong><\/p>\n<p>IFERROR can be used to tell the user when the <strong>value you are searching for is missing in the dataset<\/strong>. Instead of showing an error, the function can <strong>show a message like this &#8211; &#8220;Not found&#8221;<\/strong>.<\/p>\n<p>Let us look at an <strong>example<\/strong> of this.<\/p>\n<p><strong><span style=\"color: #ff0000\">STEP 1:<\/span><\/strong> Here, we are using the <strong>VLOOKUP<\/strong> function to <strong>retrieve the Date of Joining of the employee ID<\/strong> mentioned in cell G1 by searching the dataset.<\/p>\n<p><strong>=VLOOKUP(G1,A2:D32,4,0)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-2.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29725\" title=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-2.png\" alt=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" width=\"699\" height=\"479\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-2.png 839w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-2-300x206.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-2-768x526.png 768w\" sizes=\"(max-width: 699px) 100vw, 699px\" \/><\/a><\/p>\n<ul>\n<li><strong>G1<\/strong> represents the value we want to look up (Employee ID 1000).<\/li>\n<li><strong>A2:D32<\/strong> highlights the entire source data table.<\/li>\n<li><strong>4<\/strong> indicates that we want to retrieve the date of joining, which is located in the fourth column.<\/li>\n<li><strong>0<\/strong> ensures an exact match.<\/li>\n<\/ul>\n<p>You will notice that there is a <strong>#N\/A<\/strong> error value! This occurs because<strong> 1000 is not included in the source table<\/strong>. Let us make it <strong>look better with IFERROR<\/strong>!<\/p>\n<p><strong><span style=\"color: #ff0000\">STEP 2:<\/span><\/strong> By <strong>wrapping the VLOOKUP formula with IFERROR<\/strong>, we can replace this error with a specified text, such as &#8220;Not Found&#8221;:<\/p>\n<p><strong>=IFERROR(VLOOKUP(G1,A2:D32,4,0), &#8220;Not Found&#8221;)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-8.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29731 size-full\" title=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-8.png\" alt=\"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide\" width=\"835\" height=\"568\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-8.png 835w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-8-300x204.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/06\/IFERROR-8-768x522.png 768w\" sizes=\"(max-width: 835px) 100vw, 835px\" \/><\/a><\/p>\n<p>And just like that, your result is now clean and error-free!<\/p>\n<p>&nbsp;<\/p>\n<p>The IFERROR function <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/ifna-function\/\" target=\"_blank\" rel=\"noopener\">in Excel provides a<\/a> powerful mechanism to handle errors and enhance user experience. It is versatile and an essential tool for anyone working with data and <a class=\"wpil_keyword_link\" title=\"formulas\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/top-excel-formulas-function-examples-to-get-better-at-microsoft-excel\/\" target=\"_blank\" rel=\"noopener\" data-wpil-keyword-link=\"linked\">formulas<\/a> in Excel.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/top-20-common-excel-problems-solved\/\" target=\"_blank\"><strong>Click here<\/strong><\/a> for the <strong>Top 20 Common Excel errors<\/strong>\u00a0that you might face, or are currently facing and\u00a0how to tackle them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel is a potent and robust tool when working with an extensive dataset for calculation and analysis. However, it&#8217;s inevitable to encounter errors during such data processing. This is precisely where the IFERROR function in Excel proves to be helpful. IFERROR function displays a custom message when a function&#8217;s output is an error. In this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":29742,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"2 Useful Examples of IFERROR Function in Excel - A Beginner's Guide","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[3,284,12],"tags":[49,1273,1274,1272],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/29719"}],"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=29719"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/29719\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/29742"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=29719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=29719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=29719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}