{"id":739,"date":"2017-12-24T22:05:19","date_gmt":"2017-12-24T16:05:19","guid":{"rendered":"http:\/\/xlfxs.com\/?p=739"},"modified":"2017-12-24T22:05:19","modified_gmt":"2017-12-24T16:05:19","slug":"new-function-iferror-finally","status":"publish","type":"post","link":"https:\/\/xlfxs.com\/?p=739","title":{"rendered":"New function IFERROR, finally"},"content":{"rendered":"<p>We have already gotten used to use VLOOKUP, MATCH and other functions that generates errors inside an IF<\/p>\n<p>But, we do not need that anymore<\/p>\n<p>We can use the new guy, IFERROR instead, which will show the result if it did not generate error, otherwise will show something else if it resulted an error.<\/p>\n<p><!--more--><\/p>\n<p>So, when we have this table ..<\/p>\n<p><a href=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2017\/02\/iferror1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1164 size-full\" src=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2017\/02\/iferror1.jpg\" alt=\"\" width=\"417\" height=\"257\"><\/a><\/p>\n<p>We can search for an item in first column, using VLOOKUP for example &#8230;<\/p>\n<p><code>=VLOOKUP(J5,C:G,3,FALSE)<\/code><\/p>\n<p><a href=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2017\/02\/iferror2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1165 size-full\" src=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2017\/02\/iferror2.jpg\" alt=\"\" width=\"749\" height=\"199\"><\/a><\/p>\n<p>Which will result in an error if the item was not in list<\/p>\n<p><a href=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2017\/02\/iferror3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1166 size-full\" src=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2017\/02\/iferror3.jpg\" alt=\"\" width=\"618\" height=\"362\"><\/a><\/p>\n<p>But, if we inserted IFERROR outside of VLOOKUP, like this<\/p>\n<p><code>=IFERROR(VLOOKUP(J5,C:G,3,FALSE),\"Not found\")<\/code><\/p>\n<p>We can show anything if that item was not found &#8230;<\/p>\n<p><a href=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2017\/02\/iferror4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1167 size-full\" src=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2017\/02\/iferror4.jpg\" alt=\"\" width=\"648\" height=\"357\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>A nicer way than the #N\/A, don&#8217;t you think?<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have already gotten used to use VLOOKUP, MATCH and other functions that generates errors inside an IF But, we do not need that anymore We can use the new guy, IFERROR instead, which will show the result if it did not generate error, otherwise will show something else if it resulted an error.<\/p>\n","protected":false},"author":1,"featured_media":1167,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81,62],"tags":[],"class_list":["post-739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iferror","category-vlookup"],"_links":{"self":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts\/739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=739"}],"version-history":[{"count":0,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts\/739\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/media\/1167"}],"wp:attachment":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}