{"id":10507,"date":"2023-09-25T11:40:46","date_gmt":"2023-09-25T06:10:46","guid":{"rendered":"https:\/\/exceltrick.com\/?p=10507"},"modified":"2023-09-24T11:44:16","modified_gmt":"2023-09-24T06:14:16","slug":"excel-match-function","status":"publish","type":"post","link":"https:\/\/exceltrick.com\/functions\/excel-match-function\/","title":{"rendered":"Excel MATCH Function \u2013 How To Use"},"content":{"rendered":"<p>The MATCH function in Excel is used to locate a specific value within a cell range or array. It gives us the relative position of the data we are looking for within the array or cell range.<\/p>\n<p>The MATCH function proves especially invaluable when handling large datasets, as it enables swift and efficient identification of relative data locations, sparing the need to manually scour the entire dataset for the desired information.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10513\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/Excel-MATCH-Function.png\" alt=\"Excel MATCH Function\" width=\"753\" height=\"396\" title=\"\">\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-69f67dec2b1fe\" ><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-69f67dec2b1fe\"  type=\"checkbox\" id=\"item-69f67dec2b1fe\"><\/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-match-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-match-function\/#Important_Characteristics_of_the_MATCH_Function\" title=\"Important Characteristics of the MATCH Function\">Important Characteristics of the MATCH 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-match-function\/#Examples_of_MATCH_Function\" title=\"Examples of MATCH Function\">Examples of MATCH 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-match-function\/#Example_1_%E2%80%93_Simple_Use_of_MATCH_Function\" title=\"Example 1 &#8211; Simple Use of MATCH Function\">Example 1 &#8211; Simple Use of MATCH Function<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/exceltrick.com\/functions\/excel-match-function\/#Example_2_%E2%80%93_Using_Wildcard_with_MATCH_Function\" title=\"Example 2 &#8211; Using Wildcard with MATCH Function\">Example 2 &#8211; Using Wildcard with MATCH Function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/exceltrick.com\/functions\/excel-match-function\/#Example_3_%E2%80%93_Making_MATCH_Function_Case-sensitive\" title=\"Example 3 &#8211; Making MATCH Function Case-sensitive\">Example 3 &#8211; Making MATCH Function Case-sensitive<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/exceltrick.com\/functions\/excel-match-function\/#Example_4_%E2%80%93_Comparing_Two_Lists_Using_MATCH_Function\" title=\"Example 4 &#8211; Comparing Two Lists Using MATCH Function\">Example 4 &#8211; Comparing Two Lists Using MATCH Function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/exceltrick.com\/functions\/excel-match-function\/#Example_5_%E2%80%93_Using_VLOOKUP_with_MATCH_Function\" title=\"Example 5 &#8211; Using VLOOKUP with MATCH Function\">Example 5 &#8211; Using VLOOKUP with MATCH Function<\/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 the MATCH function contains three arguments out of which one is an optional argument.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">MATCH<\/span>(lookup_value, lookup_array, [match_type])<\/code><\/div>\n<p style=\"margin: 0px;\"><strong>Arguments:<\/strong><\/p>\n<p style=\"padding-left: 30px;\">&#39;<em>lookup_value<\/em>&#39; &#8211; This is a mandatory argument that accepts the value we want to find within a given cell range or array. The input data in the <em>lookup_value<\/em> argument can be a number, text, or logical value. It can also be a cell reference containing the data.<\/p>\n<p style=\"padding-left: 30px;\">&#39;<em>lookup_array <\/em>&#39; &#8211; This is also a required argument as it contains the cell range or array in which we want to search for the <em>lookup_value<\/em>. The value of the <em>lookup_array <\/em>must be a one-dimensional array either vertical or horizontal. It is important to note that the <em>lookup_array<\/em> must be sorted in ascending or descending order for the MATCH function to work correctly with certain <em>match_type.<\/em><\/p>\n<p style=\"padding-left: 30px;\">&#39;<em>match_type<\/em>&#39; &#8211; This is an optional argument that determines which type of match we wish to perform. The acceptable input values for the argument are -1, 0, or 1 and when left empty, the default value for this argument is 1. When the value is set to 1, the MATCH function <a href=\"https:\/\/exceltrick.com\/how-to\/find-max-value-in-range\/\">locates the largest value<\/a> that is less than or equal to the lookup_value.<\/p>\n<p style=\"padding-left: 30px;\">The <em>lookup_array<\/em> should be sorted in ascending order. If set to 0, it indicates that we are looking for an exact match. If it is set to -1, the function searches for the smallest value that is greater than or equal to the <em>lookup_value<\/em>. The <em>lookup_array<\/em> must be sorted in descending order.<\/p>\n<p>Now that we know all the possibilities of using the above-mentioned arguments, let&#39;s look at a few characteristics of the MATCH function before we dive into some exciting applications and examples.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Important_Characteristics_of_the_MATCH_Function\"><\/span>Important Characteristics of the MATCH Function<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>One of the most notable features of the MATCH function is that it is not case-sensitive. Some of the other aspects of the function that are noteworthy are as follows.<\/p>\n<ul>\n<li>When the MATCH function cannot locate the value, we are looking for, it returns a <a href=\"https:\/\/exceltrick.com\/functions\/na-error-excel\/\">#N\/A error<\/a>.<\/li>\n<li>One limitation of the MATCH function is that it only works with text up to 255 characters in length.<\/li>\n<li>In case of a duplicate or more than one occurrence of the <em>lookup_value<\/em> in the data, the MATCH function returns the first match.<\/li>\n<li>When <em>match_type<\/em> is set to 0 and the data in the <em>lookup_value<\/em> argument is a text string, we can also use wildcard characters such as the question mark (?) and the asterisk (*). The question marks represent any single character while the asterisk is used to match any sequence of characters before or after. If you wish to locate an actual question mark or asterisk, simply precede it with a tilde (~).<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Examples_of_MATCH_Function\"><\/span>Examples of MATCH Function<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Let&#39;s begin with understanding all the arguments and how they contribute to the MATCH function. Here we will take a sample dataset and use different input values for each argument allowing us to gain deeper insights into the function&#39;s workings.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10514\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_01.png\" alt=\"Examples of MATCH Function\" width=\"570\" height=\"307\" title=\"\">\n<p>In the first two examples, the input value of the <em>match_type<\/em> is set to 1. In the first case, we are looking for the value &#39;110&#39; in the array B1:F1. As the <em>lookup_value<\/em> is not in the dataset and the match_type is set to 1, the MATCH formula looks for the largest value that is less than 110 in the array. As a result, the function returns 5 as the array is sorted in ascending order.<\/p>\n<p>In the next instance, we are looking for the value &#39;100&#39; and the remaining argument values remain the same. As a result, the MATCH function returns a\u00a0 #N\/A error as there is no value that is equal to or is less than 100.<\/p>\n<p>The third example is an ideal case scenario, where we are looking for an exact match for the value &#39;103&#39; in the array. The MATCH function locates the same and returns the position of the <em>lookup_value<\/em>.<\/p>\n<p>In the last two examples, we are exploring the behavior of the MATCH function where the value of the <em>match_type<\/em> is set to -1. In such scenarios, the MATCH function identifies the smallest value that is equal to or greater than the <em>lookup_value<\/em>. So, we can see that when we are looking for &#39;1000&#39;, the function returns an error as there is no data bigger than 1000 in the dataset. On the other hand, when the <em>lookup_value<\/em> is 990, the MATCH function returns 5 for &#39;995&#39; which is the smallest value that is greater than &#39;990&#39;.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_1_%E2%80%93_Simple_Use_of_MATCH_Function\"><\/span>Example 1 &#8211; Simple Use of MATCH Function<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Suppose you own a furniture store that sells various products such as bookcases, sofas, etc. You now have the dataset which contains details such as product IDs, product names, and total sales for each product to date.<\/p>\n<p>You now wish to determine the ranking of the product based on their sales using the product IDs.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10515\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_02.png\" alt=\"Simple Use of MATCH Function\" width=\"315\" height=\"256\" title=\"\">\n<p>We can take cell E1 where the user can enter the product ID to look for. We can then use the MATCH function to determine the position or row number of the product ID. As we are looking for an exact match, the formula used will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">MATCH<\/span>(E1,A2:A11,0)<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10516\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_03.png\" alt=\"Simple Use of MATCH Function\" width=\"443\" height=\"263\" title=\"\">\n<p>This is extremely useful when the dataset is large. As the current dataset is sorted from highest sales to lowest, the result obtained from the MATCH function also provides us with the product&#39;s ranking or popularity based on sales.<\/p>\n<p>Furthermore, it is evident that the product IDs are crafted in a way where the initial three letters of the product ID align with the initial three letters of the product name. In case the user does not remember the entire product ID, we can take advantage of the wildcard characters supported by the MATCH function. Next, we&#39;ll show you how to do that.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Example_2_%E2%80%93_Using_Wildcard_with_MATCH_Function\"><\/span>Example 2 &#8211; Using Wildcard with MATCH Function<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To simplify the user experience, we can ask them to just enter the initial three letters of the product name. Subsequently, we modify the <em>lookup_value<\/em> argument, where we combine the user-entered first three letters of the product with the wildcard character &#39;*&#39;. This means that the MATCH function will look for a value that begins with the user-entered text followed by any number of characters. The formula will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">MATCH<\/span>(E1<span class=\"operator\">&amp;<\/span>\"<span class=\"string\">*<\/span>\",A2:A11,0)<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10517\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_04.png\" alt=\"Using Wildcard with MATCH Function\" width=\"448\" height=\"301\" title=\"\">\n<p>The asterisk has served as a buffer for the remaining characters of the product code &quot;SOF234PQR&quot; beyond the characters entered in E1. As observed in the previous example and stated in the characteristics, the MATCH function is case-insensitive. In the next example, let&#39;s explore the possibility of using the MATCH function in a case-sensitive manner.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Example_3_%E2%80%93_Making_MATCH_Function_Case-sensitive\"><\/span>Example 3 &#8211; Making MATCH Function Case-sensitive<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Suppose you are a marketing manager planning a fresh marketing campaign for your company, and you wish to collaborate with social media influencers to promote the campaign. You have a dataset that includes details of potential influencers, such as their name, username, and the number of followers they have on social media.<\/p>\n<p>To make it easy to filter out, you now wish to identify the position of the influencer based on their username.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10518\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_05.png\" alt=\"Making MATCH Function Case-sensitive\" width=\"496\" height=\"503\" title=\"\">\n<p>As we can see, the usernames contain both uppercase and lowercase letters, making it clear that relying solely on the MATCH function would be insufficient. Instead, we will use a combination of the <a href=\"https:\/\/exceltrick.com\/functions\/excel-exact-function\/\">EXACT function<\/a> with the MATCH function.<\/p>\n<p>The EXACT function will search for an exact case-sensitive match of the <em>lookup_value<\/em>. If it finds a match, the EXACT function returns TRUE, else it returns FALSE. The formula used will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">EXACT<\/span>(E1,B2:B15)<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10519\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_06.png\" alt=\"Making MATCH Function Case-sensitive\" width=\"474\" height=\"333\" title=\"\">\n<p>The EXACT function returned an array of TRUE and FALSE indicating where it found a perfect case-sensitive match. Now, we can use the MATCH function to look for &quot;TRUE&quot; in the previous array. The formula used will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">MATCH<\/span>(TRUE,<span class=\"function\">EXACT<\/span>(E1,B2:B15),0)<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10520\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_07.png\" alt=\"Making MATCH Function Case-sensitive\" width=\"488\" height=\"336\" title=\"\">\n<p>So, together, the EXACT function helps us figure out if there is a perfect match, and the MATCH function helps us find where that perfect match is in a list.<\/p>\n<p>There have likely been multiple occasions when you&#39;ve had to compare two columns to determine matches and differences. Employing the MATCH function is one effective method for accomplishing this task. Let&#39;s learn how to use it in the next example.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Example_4_%E2%80%93_Comparing_Two_Lists_Using_MATCH_Function\"><\/span>Example 4 &#8211; Comparing Two Lists Using MATCH Function<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this scenario, we have an upcoming technical training program that is open to all teams in the company. We now have two lists of email addresses, the first list contains the email addresses of the technical team, and List 2 contains a list of email addresses of employees who have been invited to a special training program.<\/p>\n<p>The goal is to determine which email addresses from the training program list are a part of the tech team and which ones are not.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10521\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_08.png\" alt=\"Comparing Two Lists Using MATCH Function\" width=\"463\" height=\"330\" title=\"\">\n<p>First, the MATCH function compares each cell in column B with all the data in column A. The formula used is as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">MATCH<\/span>(B2,A:A,0)<\/code><\/div>\n<p>We drag and drop the formula till the end of the dataset.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10522\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_09.png\" alt=\"Comparing Two Lists Using MATCH Function\" width=\"473\" height=\"330\" title=\"\">\n<p>The next step is to check if the return value of the MATCH function is an error (specifically, a #N\/A error). If there is an error, the <a href=\"https:\/\/exceltrick.com\/functions\/excel-isna-function\/\">ISNA function<\/a> returns TRUE; otherwise, it returns FALSE. The formula will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">ISNA<\/span>(<span class=\"function\">MATCH<\/span>(B2,A:A,0))<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10523\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_10.png\" alt=\"Comparing Two Lists Using MATCH Function\" width=\"474\" height=\"333\" title=\"\">\n<p>The last step is the simplest where we enclose the above formula in a basic <a href=\"https:\/\/exceltrick.com\/functions\/excel-if-statement\/\">IF function<\/a>. It checks the return value of the ISNA and MATCH functions. If the value is TRUE, meaning the email address in column B was not found in column A), it displays &quot;Not in Tech Team&quot;; otherwise, it displays &quot;Member of the Tech Team.&quot; The complete formula will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">IF<\/span>(<span class=\"function\">ISNA<\/span>(<span class=\"function\">MATCH<\/span>(B2,A:A,0)), \"<span class=\"string\">Not in Tech Team<\/span>\", \"<span class=\"string\">Member of the Tech Team<\/span>\")<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10524\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_11.png\" alt=\"Comparing Two Lists Using MATCH Function\" width=\"747\" height=\"368\" title=\"\">\n<p>In case, the columns to be compared contain case-sensitive values, combine the logic mentioned in the previous example to improve this formula.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Example_5_%E2%80%93_Using_VLOOKUP_with_MATCH_Function\"><\/span>Example 5 &#8211; Using VLOOKUP with MATCH Function<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Suppose you work in the HR department, and you have an Excel dataset containing information about employees, including their names, departments, and salaries. Now, you want to retrieve an employee&#39;s salary based on their name.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10525\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_12.png\" alt=\"Using VLOOKUP with MATCH Function\" width=\"609\" height=\"383\" title=\"\">\n<p>The easiest and the most preferred option is to use the <a href=\"https:\/\/exceltrick.com\/functions\/vlookup-in-excel\/\">VLOOKUP function<\/a>. The formula used will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">VLOOKUP<\/span>(G1,$A$2:$D$11,3,FALSE)<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10526\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_13.png\" alt=\"Using VLOOKUP with MATCH Function\" width=\"807\" height=\"396\" title=\"\">\n<p>Problem solved. Now, due to some reasons, you had to delete Column B containing the details about &#39;Department&#39;. Upon deleting the column, the above formula adjusted the value of the <em>table_array<\/em> but returned the value from the third column, which is &#39;Joining Date&#39;.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10527\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_14.png\" alt=\"Using VLOOKUP with MATCH Function\" width=\"754\" height=\"400\" title=\"\">\n<p>This is a limitation of the VLOOKUP formula where if we add or delete columns, the function returns incorrect data. In this case, if we delete column C as well, the function will return a <a href=\"https:\/\/exceltrick.com\/functions\/ref-error-excel\/\">#REF! error<\/a>. To avoid this issue, we can use the MATCH function to dynamically determine the column index for the VLOOKUP function.<\/p>\n<p>For instance, in this example, we are looking for values in the column named &#39;Salary (USD)&#39;. Using the MATCH function, we can dynamically determine the column index by finding the position of &quot;Salary (USD)&quot; in the first row (row 1) of the data. This ensures that if we add or remove columns, the formula will still work correctly. To find the column number, the formula used will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">MATCH<\/span>(\"<span class=\"string\">Salary (USD)<\/span>\",A1:D1,0)<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10528\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_15.png\" alt=\"Using VLOOKUP with MATCH Function\" width=\"849\" height=\"436\" title=\"\">\n<p>Now, we can use this in the above-mentioned VLOOKUP function. The formula will be as follows.<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">VLOOKUP<\/span>(G1, $A$1:$D$1, <span class=\"function\">MATCH<\/span>(\"<span class=\"string\">Salary (USD)<\/span>\",A1:D1,0), FALSE)<\/code><\/div>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10529\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_16.png\" alt=\"Using VLOOKUP with MATCH Function\" width=\"1014\" height=\"438\" title=\"\">\n<p>Now, even if we add or delete columns in the data table, the formula will still correctly retrieve the salary because it uses the MATCH function to determine the column index dynamically based on the column header &#39;Salary (USD)&#39;. The same logic can be applied while using the <a href=\"https:\/\/exceltrick.com\/functions\/hlookup-in-excel-with-examples\/\">HLOOKUP function<\/a>.<\/p>\n<p>Alternatively, we can fix the column again using the MATCH function but use the <a href=\"https:\/\/exceltrick.com\/functions\/excel-index-function\/\">INDEX function<\/a> to return the match against the lookup value. The MATCH and INDEX functions are often used as a duo and now you&#39;ll see why. Use the formula below as a base to retrieve data relevant to the lookup value without facing trouble from dynamic changes:<\/p>\n<div class=\"excelFormula\"><code><span class=\"operator\">=<\/span><span class=\"function\">INDEX<\/span>(C2:C11,<span class=\"function\">MATCH<\/span>(G1,A2:A11,0))<\/code><\/div>\n<p>Since the functions aren&#39;t restricted to retrieving data from the 3rd column, the result won&#39;t be subject to fluctuations with changes in the dataset. The MATCH function locates an exact match of the value in G1 in A2:A11 as 2. The INDEX function takes that position and returns the corresponding value from C2:C11 which is 55000.<\/p>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-10530\" src=\"https:\/\/exceltrick.com\/wp-content\/uploads\/2023\/09\/match-function-in-excel_17.png\" alt=\"Using VLOOKUP with MATCH Function\" width=\"601\" height=\"305\" title=\"\">\n<p>Practice more yourself to discover how the MATCH function fits into your work and projects. While you uncover more exciting applications, we will work on yet another Excel function to add to your repository. Stay tuned for an even broader range of Excel tools at your fingertips.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The MATCH function in Excel is used to locate a specific value within a cell range or array. It gives us the relative position of the data we are looking for within the array or cell range. The MATCH function proves especially invaluable when handling large datasets, as it enables swift and efficient identification of [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":10513,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/posts\/10507"}],"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\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/comments?post=10507"}],"version-history":[{"count":0,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/posts\/10507\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/media\/10513"}],"wp:attachment":[{"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/media?parent=10507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/categories?post=10507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exceltrick.com\/wp-json\/wp\/v2\/tags?post=10507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}