{"id":565,"date":"2019-04-17T13:18:22","date_gmt":"2019-04-17T10:18:22","guid":{"rendered":"https:\/\/www.test4u.eu\/excelpedia\/?p=565"},"modified":"2019-05-06T12:54:28","modified_gmt":"2019-05-06T09:54:28","slug":"how-to-use-the-match-function","status":"publish","type":"post","link":"https:\/\/www.test4u.eu\/excelpedia\/how-to-use-the-match-function\/","title":{"rendered":"How to use the MATCH function"},"content":{"rendered":"\n<p>There is no way to create a powerful and versatile lookup formula without using at least once the <strong><a href=\"https:\/\/www.test4u.eu\/excelpedia\/the-match-function\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"MATCH  (opens in a new tab)\">MATCH <\/a><\/strong>function. <\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe class=\"youtube-player\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/CM0tEgqVcO8?version=3&#038;rel=0&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-large-font-size\"><strong>Practice File:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/www.test4u.eu\/excelpedia\/wp-content\/uploads\/2019\/04\/match.xlsx\">match<\/a><a href=\"https:\/\/www.test4u.eu\/excelpedia\/wp-content\/uploads\/2019\/04\/match.xlsx\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Transcript<\/strong><\/p>\n\n\n\n<p>Let us see now how\nexactly it works.<\/p>\n\n\n\n<p>The match function\nlooks up information from an array of data, just like the choose function we saw\nin a previous lesson.<\/p>\n\n\n\n<p>The difference is that\nthe match function returns the position of the lookup value in the array of\ndata.<\/p>\n\n\n\n<p>The match function\nalso allows us to choose if it will return an exact match of the requested\nvalue, or the closest match (above or below) the requested value.<\/p>\n\n\n\n<p>Let us see how it works. We need to find the position (row number) of the table where the cost is 13 dollars and show it in cell D15;<\/p>\n\n\n\n<p>So in cell 15 we use the match function. For the first attribute we type the value 13 and as a lookup array we provide the cell range of the cost which is D5:D12.<\/p>\n\n\n\n<p>Since we need the\nexact match of this cost we then select 0 as the final attribute.<\/p>\n\n\n\n<p>The two other options\nwe have is 1, which is the default and minus 1.<\/p>\n\n\n\n<p>The result after we\npress enter is 3, which in such a small pool of data can easily see ourselves.<\/p>\n\n\n\n<p>If instead of 13\ndollars we searched for 15 the function would produce an error since it is\nlooking for an exact match.<\/p>\n\n\n\n<p>In this case we can\nchange the final attribute to either 1 or minus 1.<\/p>\n\n\n\n<p>If we change it to 1\nthen the function returns the closest match below or equal to the lookup value.\nFor this to work the array must be sorted in ascending order.<\/p>\n\n\n\n<p>If we set the\nattribute to \u201cminus 1\u201d then the function will return the closest match above or\nequal to the lookup value. The array in this case should be sorted in\ndescending order.<\/p>\n\n\n\n<p>In the first case the\nresult remains 3 and it represents the position of the value 13 which is the closest\nmatch below 15. <\/p>\n\n\n\n<p>In the second case the\nresult is 5 and it represents the closest match above 15 which is 19.5.<\/p>\n\n\n\n<p>Let\u2019s see how good\nmatch works when searching for a text.<\/p>\n\n\n\n<p>Suppose we have a list\nof our colleagues and their birthdays. We want to find the birthday of a friend\nwhose name begins with the letters Yv and has a double n somewhere inside it,\nbut we don\u2019t remember it exactly.<\/p>\n\n\n\n<p>Match can help us. In Cell E10 we type the function followed by the text we remember (Yv) followed by the asterisk character the double n and another asterisk character. Then we select the array of first names which is the cell range B2:B37 and for the last attribute we type 0 since we want the exact match.<\/p>\n\n\n\n<p>The result is 11 and\nin the eleventh position we find Yvonne. Her birthday is on May 4 and she is a\nfew weeks due on her present.<\/p>\n\n\n\n<p>Match by itself is a function that a lot of us might think we will never actually use. But in <a href=\"https:\/\/www.test4u.eu\/excelpedia\/advanced-lookup-functions-combinations-part-3\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"combination with other functions (opens in a new tab)\">combination with other functions<\/a> it is a tool we simply cannot ignore, as we will see on the following lessons.<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There is no way to create a powerful and versatile lookup formula without using at least once the MATCH function. <\/p>\n","protected":false},"author":2,"featured_media":567,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[49,51,32],"class_list":["post-565","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-lookup-functions","tag-match","tag-reference"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.test4u.eu\/excelpedia\/wp-content\/uploads\/2019\/04\/match.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paRnIz-97","_links":{"self":[{"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/posts\/565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/comments?post=565"}],"version-history":[{"count":0,"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/posts\/565\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/media\/567"}],"wp:attachment":[{"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/media?parent=565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/categories?post=565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.test4u.eu\/excelpedia\/wp-json\/wp\/v2\/tags?post=565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}