{"id":2320,"date":"2021-02-18T16:26:23","date_gmt":"2021-02-18T10:56:23","guid":{"rendered":"https:\/\/exceltrick.com\/?p=2320"},"modified":"2023-11-08T16:50:58","modified_gmt":"2023-11-08T11:20:58","slug":"excel-iferror-function","status":"publish","type":"post","link":"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/","title":{"rendered":"Excel IFERROR Function &#8211; How To Use"},"content":{"rendered":"<p>IFERROR function provides a great way to handle errors in Excel formulas. Excel IFERROR function returns a custom result (which can be a text, cell reference, or another formula) when the expression enclosed inside it returns an error.<\/p>\n<p>IFERROR helps you catch and address problems with your formulas so you can have clean and orderly spreadsheets. Alternatively, you can use nested IF statements to handle formula errors but nested IF statements are quite challenging to read and reduce the spreadsheets&#39; maintainability. This is the reason IFERROR function is preferred for handling errors.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-2322\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/Excel-IFERROR-Function.png\" alt=\"Excel IFERROR Function\" width=\"753\" height=\"396\" title=\"\">\n<p>Now, let&#39;s see the syntax of the IFERROR function.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_53 counter-hierarchy ez-toc-counter ez-toc-grey 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\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\" role=\"button\"><label for=\"item-69f5065b29d62\" ><span class=\"\"><span style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input aria-label=\"Toggle\" aria-label=\"item-69f5065b29d62\"  type=\"checkbox\" id=\"item-69f5065b29d62\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#Syntax\" title=\"Syntax\">Syntax<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#Important_Characteristics_of_the_IFERROR_function\" title=\"Important Characteristics of the IFERROR function\">Important Characteristics of the IFERROR function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#Examples_of_IFERROR_Function\" title=\"Examples of IFERROR Function\">Examples of IFERROR Function<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#Example_1_%E2%80%93_Handling_NA_errors_in_VLOOKUP_Function\" title=\"Example 1 \u2013 Handling #NA errors in VLOOKUP Function\">Example 1 \u2013 Handling #NA errors in VLOOKUP Function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#Example_2_%E2%80%93_Handling_VALUE_Or_Invalid_Parameter_Errors\" title=\"Example 2 \u2013 Handling #VALUE! Or Invalid Parameter Errors\">Example 2 \u2013 Handling #VALUE! Or Invalid Parameter Errors<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#Example_3_%E2%80%93_Handling_DIV0_Or_Divide_By_Zero_Errors\" title=\"Example 3 \u2013 Handling #DIV\/0! Or Divide By Zero Errors\">Example 3 \u2013 Handling #DIV\/0! Or Divide By Zero Errors<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#Example_4_%E2%80%93_Handling_Errors_In_Array_Formulas_Using_IFERROR_Function\" title=\"Example 4 &#8211; Handling Errors In Array Formulas Using IFERROR Function\">Example 4 &#8211; Handling Errors In Array Formulas Using IFERROR Function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#Example_5_%E2%80%93_Importance_of_IFERROR_Function_in_Excel_Calculators_and_Templates\" title=\"Example 5 \u2013 Importance of IFERROR Function in Excel Calculators and Templates\">Example 5 \u2013 Importance of IFERROR Function in Excel Calculators and Templates<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#IFERROR_vs_ISERROR\" title=\"IFERROR vs. ISERROR\">IFERROR vs. ISERROR<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#ISERROR_Function_Example\" title=\"ISERROR Function Example\">ISERROR Function Example<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/exceltrick.com\/functions\/excel-iferror-function\/#IFERROR_vs_IFNA\" title=\"IFERROR vs. IFNA\">IFERROR vs. IFNA<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Syntax\"><\/span>Syntax<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The syntax of an IFERROR function is as follows:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IFERROR<\/span>(value, value_if_error)<\/code><\/div>\n<p style=\"padding-left: 30px;\"><code>'value'<\/code> &#8211; This a required parameter that tells the function what to check for errors. It may be an expression, formula, or cell reference.<br \/>\n<code>'value_if_error'<\/code> &#8211;<strong>\u00a0<\/strong>This is also a required parameter that represents the value returned from the function in case of an error. It may be an empty string, a cell reference blank cell, a line of text, a numeric value, or another formula or expression.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Important_Characteristics_of_the_IFERROR_function\"><\/span>Important Characteristics of the IFERROR function<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>The IFERROR function deals with all types of errors. This includes #N\/A, #DIV\/0, #NAME, #NUM!, <a href=\"https:\/\/exceltrick.com\/functions\/null-error-excel\/\">#NULL<\/a>, #VALUE, and #REF.<\/li>\n<li>IFERROR function is only available in Excel 2007 or higher versions.<\/li>\n<li>To catch errors in earlier versions of Excel (2003 and below), you&#39;ll have to use the ISERROR function combined with the IF function.<\/li>\n<li>An empty <code>'value'<\/code> parameter will result in an empty string (&quot;&quot;) instead of an error.<\/li>\n<li>An empty <code>'value_if_error'<\/code> parameter will also be evaluated as an empty string (&quot;&quot;), and hence, no message will be displayed if an error is found.<\/li>\n<li>IFERROR function can be used with array formulas. If an array formula is passed as a value parameter to the IFERROR function, the function returns an array of results for every cell in the specified range.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Examples_of_IFERROR_Function\"><\/span>Examples of IFERROR Function<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now let&#39;s try to understand the IFERROR function with some examples.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_1_%E2%80%93_Handling_NA_errors_in_VLOOKUP_Function\"><\/span>Example 1 \u2013 Handling #NA errors in VLOOKUP Function<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Let&#39;s assume we have a list of students along with their registration numbers. We try to find the registration number for a student with the name &quot;Glen&quot; out of that list.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2323 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_EXAMPLE_01.png\" alt=\"Handling #NA errors in VLOOKUP Function\" width=\"712\" height=\"335\" title=\"\">\n<p>For this, we will be writing a VLOOKUP function as \u2013<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">VLOOKUP<\/span>(\"<span class=\"string\">Glen<\/span>\",A1:B11,2,0)<\/code><\/div>\n<p>But since &#39;Glen&#39; doesn&#39;t exist in the student list, so VLOOKUP gives a #N\/A error, as shown in the above image.<\/p>\n<p>Now, to replace #N\/A with a more meaningful text like &quot;Student Not Found!&quot; we&#39;ll have to use the IFERROR function.<\/p>\n<p>To use the IFERROR function in this case, we will need to use the VLOOKUP function as the first parameter to the IFERROR and text &quot;Student Not Found!&quot; as the second parameter.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2332 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_VLOOKUP_NA_ERROR_02.png\" alt=\"replace #N\/A with a more meaningful text like &quot;Student Not Found!&quot;\" width=\"712\" height=\"335\" title=\"\">\n<p>The formula should look like this:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IFERROR<\/span>(<span class=\"function\">VLOOKUP<\/span>(\"<span class=\"string\">Glen<\/span>\",A1:B11,2,0),\"<span class=\"string\">Student Not Found!<\/span>\")<\/code><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Example_2_%E2%80%93_Handling_VALUE_Or_Invalid_Parameter_Errors\"><\/span>Example 2 \u2013 Handling #VALUE! Or Invalid Parameter Errors<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Let&#39;s assume we have a task planner spreadsheet that calculates the days between two dates using the <a href=\"https:\/\/exceltrick.com\/functions\/excel-networkdays-function\/\"  rel=\"noopener\">NETWORKDAYS function<\/a> as shown.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2330 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_VALUE_ERROR_03.png\" alt=\"Handling #VALUE! Or Invalid Parameter Errors\" width=\"567\" height=\"243\" title=\"\">\n<p>As shown in the image, Task \u2013 4 is an ongoing task and does not have an enddate, and hence the enddate is marked as &#39;NA&#39;. But while calculating days, NETWORKDAYS displays a #VALUE! error.<\/p>\n<p>To fix this error, we can wrap our formula inside an IFERROR function and display a suitable message instead of an error.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2331 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_VALUE_ERROR_04.png\" alt=\"display a suitable message instead of an error\" width=\"617\" height=\"234\" title=\"\">\n<p>So, our formula would be:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IFERROR<\/span>(<span class=\"function\">NETWORKDAYS<\/span>(B6,C6), \"<span class=\"string\">Ongoing Task<\/span>\")<\/code><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Example_3_%E2%80%93_Handling_DIV0_Or_Divide_By_Zero_Errors\"><\/span>Example 3 \u2013 Handling #DIV\/0! Or Divide By Zero Errors<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now let&#39;s suppose we have a weekly sales stats report of a gift store. The report represents total orders generated by each sales manager along with the total sales value.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2325 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_DIVIDE_BY_ZERO_ERROR_05.png\" alt=\"Handling #DIV\/0! Or Divide By Zero Errors\" width=\"595\" height=\"245\" title=\"\">\n<p>In the report, we want to calculate the &#39;Average Order Value&#39; generated by each sales manager. For calculating the &#39;average order value&#39;, we can use a formula &#8211; Total Sales Value \/ Total Orders.<\/p>\n<p>An excel formula can represent this as:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span>C3<span class=\"operator\">\/<\/span>B3<\/code><\/div>\n<p>As we can see, the report sales manager &#39;Donald Perkins&#39; has made zero sales for the week, and hence this formula results in an error.<\/p>\n<p>The #DIV\/0 error really stands out, and it would be embarrassing to have such errors appear in your excel report.<\/p>\n<p>We can use the IFERROR function in such a case and pass our existing formula as the first argument to the function, and the second argument would be a suitable message or an empty string.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2326 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_DIVIDE_BY_ZERO_ERROR_06.png\" alt=\"This will show an empty string in case an error occurs in the inner formula\" width=\"613\" height=\"256\" title=\"\">\n<p>So, the final formula would be:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IFERROR<\/span>(C3<span class=\"operator\">\/<\/span>B3,\"\")<\/code><\/div>\n<p>This will show an empty string in case an error occurs in the inner formula.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_4_%E2%80%93_Handling_Errors_In_Array_Formulas_Using_IFERROR_Function\"><\/span>Example 4 &#8211; Handling Errors In Array Formulas Using IFERROR Function<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Array formulas in excel allow you to perform powerful calculations on one or more value sets. Let&#39;s take example 3 and use an array formula to populate &#39;Average Order Value&#39; against each row.<\/p>\n<p>To do this, we will have an array formula that divides each value in the cell range C3:C7 by the appropriate cell within the range B3:B7, and then press &#39;control + shift + enter&#39; keys.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2349 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/Adding-Array-formula-071.gif\" alt=\"Handling Errors In Array Formulas Using IFERROR Function\" width=\"597\" height=\"247\" title=\"\">\n<p>The formula would be:<\/p>\n<div class=\"excelFormula\"><code>{<span class=\"operator\">=<\/span>C3:C7<span class=\"operator\">\/<\/span>B3:B7}<\/code><\/div>\n<p>And as we can see with the array formula, we are again getting a &#39;# DIV\/0&#39; error for the D6 cell.<\/p>\n<p>To fix this, we can use the IFERROR function. IFERROR function, when used with an array formula, returns an array of values for each cell in the range provided.<\/p>\n<p>So our final formula would be:<\/p>\n<div class=\"excelFormula\"><code>{<span class=\"operator\">=<\/span><span class=\"function\">IFERROR<\/span>(C3:C7<span class=\"operator\">\/<\/span>B3:B7,\"\")}<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter wp-image-2324 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_ARRAY_FORMULA_08.png\" alt=\"IFERROR function, when used with an array formula, returns an array of values for each cell in the range provided\" width=\"604\" height=\"239\" title=\"\">\n<p>This formula divides each value in the range C3:C7 with an appropriate value from range B3:B7, and then returns an array of results. The IFERROR function captures all the #DIV\/0 errors and replaces them with empty strings.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_5_%E2%80%93_Importance_of_IFERROR_Function_in_Excel_Calculators_and_Templates\"><\/span>Example 5 \u2013 Importance of IFERROR Function in Excel Calculators and Templates<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Let&#39;s consider you are building a Monthly Loan Repayment Calculator in Excel, as shown below.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2327 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_Templates_09.png\" alt=\"Importance of IFERROR Function in Excel Calculators and Templates\" width=\"475\" height=\"243\" title=\"\">\n<p>This template works nicely with all the data, but if the user forgets to enter any mandatory value, the formula returns an error.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-2328\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_Templates_With_Errros_10.png\" alt=\"IFERROR_WITH_Templates_With_Errros_10\" width=\"475\" height=\"243\" title=\"\">\n<p>Errors like this stand out, and it is quite awkward to have such errors in your excel templates.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2329 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_WITH_Templates_With_IFError_11.png\" alt=\"wrap your formulas in an IFERORR function and display a more meaningful message to the end-user\" width=\"760\" height=\"282\" title=\"\">\n<p>To fix this, you could wrap your formulas in an IFERORR function and display a more meaningful message to the end-user. For example:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IFERROR<\/span>(<span class=\"function\">PMT<\/span>((B4%<span class=\"operator\">\/<\/span>12),B5,B3,0), \"<span class=\"string\">Mandatory fields should not be blank!<\/span>\")<\/code><\/div>\n<h2><span class=\"ez-toc-section\" id=\"IFERROR_vs_ISERROR\"><\/span>IFERROR vs. ISERROR<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <a href=\"https:\/\/exceltrick.com\/functions\/excel-iserror-function\/\"  rel=\"noopener\">ISERROR function<\/a> is an error-handling alternative for those who are working with Excel 2003 or lower versions. Since the IFERROR function came out with Excel 2007 so before that, for handling formula errors, we used ISERROR Function with\u00a0<a href=\"https:\/\/exceltrick.com\/functions\/excel-if-statement\/\"  rel=\"noopener noreferrer\">Excel IF Statement<\/a>.<\/p>\n<p>ISERROR function accepts a single argument, which can be an expression, formula, or cell reference. If the supplied argument results in an error, it returns TRUE otherwise, it returns FALSE.<\/p>\n<p>The errors that the ISERROR function checks are as follows:<\/p>\n<ul>\n<li>#N\/A Error<\/li>\n<li>#VALUE Error<\/li>\n<li>#REF Error<\/li>\n<li>#DIV\/0! Error<\/li>\n<li>#NUM! Error<\/li>\n<li>#NAME? Error<\/li>\n<li>#NULL! Error<\/li>\n<\/ul>\n<p>ISERROR Function differs from the IFERROR in the sense that &#8211; the ISERROR function returns a Boolean value if there is an error or not. On the other hand, the IFERROR function allows the user to put up a custom and meaningful value or string instead of the error.<\/p>\n<p><strong>Syntax of ISERROR Function<\/strong><\/p>\n<p>The syntax of the ISERROR function is as follows:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">ISERROR<\/span>(value)<\/code><\/div>\n<p><code>'value'<\/code> &#8211; This a required parameter that tells the function what to check for errors. It may be an expression, formula, or cell reference.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"ISERROR_Function_Example\"><\/span>ISERROR Function Example<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Let&#39;s again revisit Example 1 and try to handle the error using the ISERROR function. So, we have a list of students along with their registration numbers. We try to find the registration number for a student with the name &quot;Glen&quot; out of that list.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2323 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFERROR_EXAMPLE_01.png\" alt=\"ISERROR Function Example\" width=\"712\" height=\"335\" title=\"\">\n<p>For this, we will be writing a VLOOKUP function as \u2013<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">VLOOKUP<\/span>(\"<span class=\"string\">Glen<\/span>\",A1:B11,2,0)<\/code><\/div>\n<p>But since &#39;Glen&#39; doesn&#39;t exist in the student list, so VLOOKUP gives a #N\/A error, as shown in the above image. In the previous example, we used the IFERROR function to replace the #N\/A error with a more meaningful text like &quot;Student Not Found!&quot;<\/p>\n<p>But here, let&#39;s try to use the ISERROR function along with the IF function to achieve the same result. So, the formula would be:<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2335 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/ISERROR_WITH_IF_12.png\" alt=\"ISERROR function along with the IF function to achieve the same result\" width=\"897\" height=\"335\" title=\"\">\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IF<\/span>(<span class=\"function\">ISERROR<\/span>(<span class=\"function\">VLOOKUP<\/span>(\"<span class=\"string\">Glen<\/span>\",A2:B11,2,0)),\"<span class=\"string\">Student Not Found!<\/span>\", <span class=\"function\">VLOOKUP<\/span>(\"<span class=\"string\">Glen<\/span>\",A2:B11,2,0))<\/code><\/div>\n<p><strong>NOTE:<\/strong>\u00a0IFERROR function automatically assumes you will always want the result if your calculations don&#39;t have any errors. ISERROR, on the other hand, gives you either &quot;TRUE&quot; or a &quot;FALSE&quot;, and when combined with the IF function, you can have more control over the result in both outcomes.<\/p>\n<p><em>Recommended Reading<\/em>: <a href=\"https:\/\/exceltrick.com\/functions\/excel-iserr-function\/\"  rel=\"noopener noreferrer\">Excel ISERR Function \u2013 How to Use<\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"IFERROR_vs_IFNA\"><\/span>IFERROR vs. IFNA<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/exceltrick.com\/functions\/excel-ifna-function\/\"  rel=\"noopener noreferrer\">IFNA Function<\/a> is another error handling function in Excel. However, the IFNA function only catches #N\/A errors and allows us to display more meaningful error messages in case of a #N\/A error.<\/p>\n<p><strong>Syntax of IFNA Function<\/strong><\/p>\n<p>The syntax of IFNA Function is as follows:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IFNA<\/span>(value, value_if_na)<\/code><\/div>\n<p><code>'value'<\/code> &#8211; the expression, formula, or reference excel should be checked for errors.<\/p>\n<p><code>'value_if_na'<\/code> &#8211; represents the value returned from the function in case of an #N\/A error. It may be an empty string, a cell reference blank cell, a line of text, a numeric value, or another formula or expression.<\/p>\n<p>IFNA works best with lookup functions such as <a href=\"https:\/\/exceltrick.com\/functions\/vlookup-in-excel\/\"  rel=\"noopener noreferrer\">VLOOKUP<\/a>, <a href=\"https:\/\/exceltrick.com\/functions\/excel-match-function\/\"  rel=\"noopener noreferrer\">MATCH<\/a>, <a href=\"https:\/\/exceltrick.com\/functions\/hlookup-in-excel-with-examples\/\"  rel=\"noopener noreferrer\">HLOOKUP<\/a>, and LOOKUP.<\/p>\n<p><strong>IFNA Function Example<\/strong><\/p>\n<p>Let&#39;s try to understand the IFNA function again with Example 1.<\/p>\n<p>So, we have a list of students, and we are trying to fetch details for a student named &quot;Glen&quot; using a VLOOKUP function. However, since &quot;Glen&quot; is not a part of the list, so the VLOOKUP function throws a #N\/A error.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2333 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFNA_EXAMPLE_13.png\" alt=\"IFERROR vs. IFNA\" width=\"681\" height=\"334\" title=\"\">\n<p>To handle such errors, we make use of the IFNA function as \u2013<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IFNA<\/span>(<span class=\"function\">VLOOKUP<\/span>(\"<span class=\"string\">Glen<\/span>\",A2:B11,2,0),\"<span class=\"string\">Student Not Found!<\/span>\")<\/code><\/div>\n<p>This formula results in a more meaningful text, &quot;Student Not Found!&quot; if no student with the name &quot;Glen&quot; is found in the given range.<\/p>\n<p><strong>Please Note:<\/strong>\u00a0IFNA Function only handles #N\/A errors and does not catch or handle any other errors, as shown in the below screenshot.<\/p>\n<img decoding=\"async\" class=\"aligncenter wp-image-2334 size-full\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2021\/02\/IFNA_EXAMPLE_14.png\" alt=\"IFNA Function only handles #N\/A errors and does not catch or handle any other errors\" width=\"427\" height=\"150\" title=\"\">\n<p>In the above image, we can clearly see that the IFNA function misses the #DIV\/0! Error and returns the error as it is.<\/p>\n<p><em>Recommended Reading<\/em>:\u00a0<a href=\"https:\/\/exceltrick.com\/functions\/excel-isna-function\/\"  rel=\"noopener noreferrer\">ISNA Function In Excel<\/a><\/p>\n<p>So this was all about the IFERROR function in excel. We will get back to you with another amazing function. Stay Tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IFERROR function provides a great way to handle errors in Excel formulas. Excel IFERROR function returns a custom result (which can be a text, cell reference, or another formula) when the expression enclosed inside it returns an error. IFERROR helps you catch and address problems with your formulas so you can have clean and orderly [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2322,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[34,18],"_links":{"self":[{"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/posts\/2320"}],"collection":[{"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/comments?post=2320"}],"version-history":[{"count":0,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/posts\/2320\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/media\/2322"}],"wp:attachment":[{"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/media?parent=2320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/categories?post=2320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/tags?post=2320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}