{"id":20327,"date":"2019-04-04T09:00:26","date_gmt":"2019-04-04T14:00:26","guid":{"rendered":"https:\/\/breakingintowallstreet.com\/biws\/kb\/%kb_category%\/advanced-formulas-in-excel-index-match-and-indirect\/"},"modified":"2024-09-11T19:09:11","modified_gmt":"2024-09-12T00:09:11","slug":"index-match-function-excel","status":"publish","type":"biws_kb","link":"https:\/\/breakingintowallstreet.com\/kb\/excel\/index-match-function-excel\/","title":{"rendered":"Index Match Function Excel [Tutorial Video] (16:32)"},"content":{"rendered":"<p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-flat ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Index Match Function Excel<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/breakingintowallstreet.com\/kb\/excel\/index-match-function-excel\/#Index_Match_Function_Excel_Starting_with_INDEX\">Index Match Function Excel: Starting with INDEX<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/breakingintowallstreet.com\/kb\/excel\/index-match-function-excel\/#The_MATCH_Function_in_Excel\">The MATCH Function in Excel<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/breakingintowallstreet.com\/kb\/excel\/index-match-function-excel\/#Index_Match_Function_Excel_Combining_INDEX_and_MATCH\">Index Match Function Excel: Combining INDEX and MATCH<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/breakingintowallstreet.com\/kb\/excel\/index-match-function-excel\/#Rewriting_a_VLOOKUP_Function_with_the_INDEX_and_MATCH_Functions\">Rewriting a VLOOKUP Function with the INDEX and MATCH Functions<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/breakingintowallstreet.com\/kb\/excel\/index-match-function-excel\/#Other_Uses_of_INDEX_and_MATCH_in_Excel\">Other Uses of INDEX and MATCH in Excel<\/a><\/li><\/ul><\/nav><\/div>\n<br \/>\nThe <strong>Index Match function<\/strong> combination in <a href=\"https:\/\/www.microsoft.com\/en-au\/microsoft-365\/excel\" target=\"_blank\" rel=\"noopener\">Excel<\/a> is the best way to <strong>retrieve data from ranges of cells in Excel<\/strong>.<\/p>\n<p>The Index Match combo gets around the limitations of functions like VLOOKUP and HLOOKUP, and it&#8217;s faster and far more flexible than either of these.<\/p>\n<p>It&#8217;s arguably even better than the newer XLOOKUP function because you can write a single INDEX function to search an entire range rather than having to write &#8220;double&#8221; XLOOKUP functions, with one inside the other.<\/p>\n<p>You use the Index Match Function Excel combination to retrieve specific items in data analyses and to set up scenarios and lists of comparable public companies and precedent transactions in financial models.<\/p>\n<p>Let&#8217;s start by looking at a few simple examples of how it works:<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Index_Match_Function_Excel_Starting_with_INDEX\"><\/span>Index Match Function Excel: Starting with INDEX<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Let&#8217;s say that we have a list of sales representatives (sales reps) for a company in a spreadsheet called &#8220;Sales_Reps&#8221;.<\/p>\n<p>We could use the INDEX function to retrieve information from a specific row and column number, using this syntax:<\/p>\n<p>=INDEX(Array, Row Number, Column Number)<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22001 size-large\" title=\"Simple INDEX Function\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075528\/Index-Match-Function-Excel-01-1024x255.jpg\" alt=\"Simple INDEX Function\" width=\"1024\" height=\"255\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075528\/Index-Match-Function-Excel-01-1024x255.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075528\/Index-Match-Function-Excel-01-300x75.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075528\/Index-Match-Function-Excel-01-768x191.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075528\/Index-Match-Function-Excel-01.jpg 1194w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Since the 3rd row is for &#8220;Cletus Richie&#8221; and the 7th column is for &#8220;Hire Date&#8221; this function retrieves Cletus Richie&#8217;s Hire Date:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22002 size-large\" title=\"INDEX Function Results\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075527\/Index-Match-Function-Excel-02-1024x260.jpg\" alt=\"INDEX Function Results\" width=\"1024\" height=\"260\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075527\/Index-Match-Function-Excel-02-1024x260.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075527\/Index-Match-Function-Excel-02-300x76.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075527\/Index-Match-Function-Excel-02-768x195.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075527\/Index-Match-Function-Excel-02.jpg 1176w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Since we have to specify the exact row number and column number in this range, though, this function is\u00a0<em>worse<\/em> than VLOOKUP and HLOOKUP &#8211; at least those functions find the item in a range of data!<\/p>\n<p>If the range of cells you&#8217;re indexing has only 1 column, the &#8220;Column Number&#8221; part of the INDEX function is optional:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22003 size-large\" title=\"INDEX with Optional Column Number\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075526\/Index-Match-Function-Excel-03-1024x269.jpg\" alt=\"INDEX with Optional Column Number\" width=\"1024\" height=\"269\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075526\/Index-Match-Function-Excel-03-1024x269.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075526\/Index-Match-Function-Excel-03-300x79.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075526\/Index-Match-Function-Excel-03-768x202.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075526\/Index-Match-Function-Excel-03.jpg 1173w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>But if the range has more than 1 column, leaving out the Column Number will generate a #REF! error.<\/p>\n<p>By itself, INDEX is not very useful because of the need to specify the exact row and column numbers.<\/p>\n<p><strong>Combining INDEX with MATCH &#8211; usually two MATCH functions &#8211; though, makes it an\u00a0<em>incredibly useful<\/em> function combination in Excel.<\/strong><\/p>\n<div class='code-block code-block-4' style='margin: 8px 0; clear: both;'>\n<div class=\"kb-adinsert-modal\">\n    <div class=\"kb-adinsert-top\">\n      <div class=\"media\">\n          <img decoding=\"async\" class=\"alignnone size-full wp-image-28448\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2024\/05\/07054849\/Excel-VBA-Ico.png\" alt=\"Excel & VBA\" width=\"128\" height=\"128\" \/>\n      <\/div>\n      <div class=\"content\">\n          <h3>Learn Excel Shortcuts, Formulas, Graphs, Data, and VBA for Automation<\/h3>\n      <\/div>\n    <\/div>\n    \n    <div class=\"full_text\">\n    \t<ul>\n        \t<li>\n            \t<h4>Become a shortcut, formula & formatting machine<\/h4>\n              <p>Excel will be your \u201cnative language\u201d after you finish this course<\/p>\n\t\t\t    <\/li>\n          <li>\n          \t<h4>Learn the skills with dozens of practice exercises<\/h4>\n            <p>Learn by doing and check your work against the solutions<\/p>\n\t\t\t    <\/li>\n          <li>\n          \t<h4>Shave hours off your workday with VBA and macros<\/h4>\n            <p>Automate repetitive tasks, format spreadsheets quickly, and more\n\n<\/p>\n\t\t\t  <\/li>\n      <\/ul>\n        \n      <a class=\"cta-link orange-button-medium\" href=\"https:\/\/breakingintowallstreet.com\/excel-vba\/\" target=\"_blank\">Full Details<\/a>\n      \n      <a class=\"cta-link orange-button-medium bg-blue\" href=\"https:\/\/biws-support.s3.us-east-1.amazonaws.com\/Course-Outlines\/Excel-VBA-Course-Outline.pdf\" target=\"_blank\" rel=\"noopener\">Short Outline<\/a>\n    <\/div>\n<\/div>\n<\/div>\n\n<h2><span class=\"ez-toc-section\" id=\"The_MATCH_Function_in_Excel\"><\/span>The MATCH Function in Excel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The MATCH function finds the row or column number of an item in a range of cells, and then it passes those row and column numbers into INDEX.<\/p>\n<p>Here&#8217;s an example of how MATCH works by itself, using the following syntax:<\/p>\n<p>=MATCH(Lookup Value, Lookup Array, Match Type)<\/p>\n<p>You normally set &#8220;Match Type&#8221; to 0 for an Exact Match:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22004 size-large\" title=\"MATCH with Exact Match\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-04-1024x275.jpg\" alt=\"MATCH with Exact Match\" width=\"1024\" height=\"275\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-04-1024x275.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-04-300x81.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-04-768x206.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-04.jpg 1195w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>This MATCH function returns 4 since &#8220;State&#8221; is in the 4th position of this row at the top.<\/p>\n<p>This 4 is the\u00a0<em>relative position<\/em> of &#8220;State&#8221; in the row &#8211; <strong>not<\/strong> its absolute position, which is column #5 (column E)!<\/p>\n<p>We can also use MATCH to find items in a column:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22005 size-large\" title=\"MATCH Function for a Column\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-05-1024x271.jpg\" alt=\"MATCH Function for a Column\" width=\"1024\" height=\"271\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-05-1024x271.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-05-300x79.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-05-768x203.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075525\/Index-Match-Function-Excel-05.jpg 1177w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>This function returns 10 since the Sales Rep with a base salary of $89,00 is in the\u00a0<em>10th row of\u00a0<span style=\"text-decoration: underline;\">this specific column<\/span><\/em>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Index_Match_Function_Excel_Combining_INDEX_and_MATCH\"><\/span>Index Match Function Excel: Combining INDEX and MATCH<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When you combine INDEX and MATCH,\u00a0<strong>the size of the range in the INDEX function\u00a0<span style=\"text-decoration: underline;\">must<\/span> match the sizes of the ranges in the MATCH functions.<\/strong><\/p>\n<p>Here&#8217;s an example where we search for the name of Sales Rep #6:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22006 size-large\" title=\"Index Match Function Excel: Combined\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075524\/Index-Match-Function-Excel-06-1024x255.jpg\" alt=\"Index Match Function Excel: Combined\" width=\"1024\" height=\"255\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075524\/Index-Match-Function-Excel-06-1024x255.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075524\/Index-Match-Function-Excel-06-300x75.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075524\/Index-Match-Function-Excel-06-768x191.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075524\/Index-Match-Function-Excel-06.jpg 1194w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>This produces &#8220;Sylvia Marin&#8221; because that is the name of the Sales Rep with ID 6. The function here is:<\/p>\n<p>=INDEX(B2:K11,MATCH(6,G2:G11,0),MATCH(&#8220;Name&#8221;,B2:K2,0))<\/p>\n<p>Here is what happens internally:<\/p>\n<p>First, Excel looks in the G2:G11 column for the number 6. It needs an exact match because of the 0 in this function: MATCH(6,G2:G11,0).<\/p>\n<p>It finds this number 6 in row 7 of this range.<\/p>\n<p>Then, Excel looks in row B2:K2 for &#8220;Name&#8221; and it once again needs an exact match because of the 0 in this function: MATCH(&#8220;Name&#8221;,B2:K2,0).<\/p>\n<p>It finds &#8220;Name&#8221; in column 1 of this range.<\/p>\n<p>Then, Excel replaces these MATCH functions with the numbers 7 and 1 instead:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22007 size-large\" title=\"Index Match Function Excel: How Excel Processes It\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-07-1024x256.jpg\" alt=\"Index Match Function Excel: How Excel Processes It\" width=\"1024\" height=\"256\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-07-1024x256.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-07-300x75.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-07-768x192.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-07.jpg 1196w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>And this produces the &#8220;answer&#8221; of Sylvia Marin:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22008 size-large\" title=\"Result of the INDEX and MATCH Function\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-08-1024x261.jpg\" alt=\"Result of the INDEX and MATCH Function\" width=\"1024\" height=\"261\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-08-1024x261.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-08-300x76.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-08-768x195.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075523\/Index-Match-Function-Excel-08.jpg 1175w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Unlike VLOOKUP and HLOOKUP, this Index Match Function Excel combination can search in\u00a0<em>any row or column in the range of cells<\/em> &#8211; not just the leftmost column or topmost row.<\/p>\n<p>It also works even if the range of cells changes (i.e., rows or columns are added or deleted) because it always <em>searches<\/em> for specific items in the reference row or column:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22009 size-large\" title=\"INDEX and MATCH Flexibility Over Ranges\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-09-1024x239.jpg\" alt=\"INDEX and MATCH Flexibility Over Ranges\" width=\"1024\" height=\"239\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-09-1024x239.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-09-300x70.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-09-768x179.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-09.jpg 1478w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>The only disadvantage is that the INDEX\/MATCH\/MATCH combination takes a bit more time to set up than VLOOKUP or HLOOKUP, but it&#8217;s so much more flexible that the additional time requirement doesn&#8217;t even matter.<\/p>\n<p>Also, you must be\u00a0<em>very careful<\/em> with the ranges used in the INDEX function and the two inner MATCH functions, or this combination will not work properly:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22010 size-large\" title=\"Misaligned Range in INDEX and MATCH\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-10-1024x345.jpg\" alt=\"Misaligned Range in INDEX and MATCH\" width=\"1024\" height=\"345\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-10-1024x345.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-10-300x101.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-10-768x259.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075522\/Index-Match-Function-Excel-10.jpg 1199w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Rewriting_a_VLOOKUP_Function_with_the_INDEX_and_MATCH_Functions\"><\/span>Rewriting a VLOOKUP Function with the INDEX and MATCH Functions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We can now use INDEX and MATCH to rewrite previous VLOOKUP and HLOOKUP functions and make them more flexible.<\/p>\n<p>For example, we previously used VLOOKUP to calculate the Commissions owed to each sales rep for each sale in a table of customer orders.<\/p>\n<p>But we can now rewrite it using the INDEX\/MATCH\/MATCH combination:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22011 size-large\" title=\"Rewriting a VLOOKUP Function\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-11-1024x403.jpg\" alt=\"Rewriting a VLOOKUP Function\" width=\"1024\" height=\"403\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-11-1024x403.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-11-300x118.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-11-768x302.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-11.jpg 1219w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>What&#8217;s the advantage?<\/p>\n<p>Now, if we ever change the position of the &#8220;Commission Rate&#8221; column in the Sales_Reps spreadsheet, or we insert or delete columns, this function will still work:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22012 size-large\" title=\"Index Match Function Excel - Flexibility\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-12-1024x563.jpg\" alt=\"Index Match Function Excel - Flexibility\" width=\"1024\" height=\"563\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-12-1024x563.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-12-300x165.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-12-768x422.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075521\/Index-Match-Function-Excel-12.jpg 1191w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>This may seem like a minor point, but spreadsheets change\u00a0<em>all the time<\/em> as you go through different versions and processes.<\/p>\n<p>The other big advantage is that with VLOOKUP, we\u00a0<em>must<\/em> start in column G of the Sales_Reps spreadsheet since that&#8217;s the one that contains the Sales Rep IDs.<\/p>\n<p>But with INDEX\/MATCH, there are no such requirements, so we can INDEX the entire range and then decide which row and column to search later on.<\/p>\n<p>This point is a bigger advantage because there are many, many cases in which you need to find an item and then move to the left, or find an item and move up &#8211; or move in some other directions.<\/p>\n<p>With VLOOKUP and HLOOKUP, you can&#8217;t do that at all &#8211; but it&#8217;s easy with INDEX and MATCH.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Other_Uses_of_INDEX_and_MATCH_in_Excel\"><\/span>Other Uses of INDEX and MATCH in Excel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Outside of data analysis, we also use the INDEX\/MATCH combination all the time in financial models. Here are a few examples:<\/p>\n<p>First, we often use this function combo to set up\u00a0<strong>scenarios<\/strong> in models and select the appropriate number based on the selected scenario:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22013 size-large\" title=\"Index Match Function Excel - Scenarios in a Financial Model\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075520\/Index-Match-Function-Excel-13-1024x504.jpg\" alt=\"Index Match Function Excel - Scenarios in a Financial Model\" width=\"1024\" height=\"504\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075520\/Index-Match-Function-Excel-13-1024x504.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075520\/Index-Match-Function-Excel-13-300x148.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075520\/Index-Match-Function-Excel-13-768x378.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075520\/Index-Match-Function-Excel-13.jpg 1379w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Notice here that the range used in the MATCH function does not have to be &#8220;inside&#8221; the indexed area &#8211; it just needs to be\u00a0<em>the same height as the indexed area<\/em>, i.e., it must have the same number of rows.<\/p>\n<p>This is what the concept of &#8220;alignment&#8221; means &#8211; you don&#8217;t necessarily need an exact match, <strong>but the number of rows and number of columns in the inner MATCH functions must match the number of rows and columns in the indexed range<\/strong>.<\/p>\n<p>We also use INDEX and MATCH for retrieving data from &#8220;calculations&#8221; sheets, such as those for <a href=\"https:\/\/breakingintowallstreet.com\/kb\/valuation\/comparable-company-analysis-cca\/\" target=\"_blank\" rel=\"noopener noreferrer\">comparable company analysis (CCA)<\/a>:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22014\" title=\"INDEX and MATCH for Calculations in Comparable Company Analysis\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-14.jpg\" alt=\"INDEX and MATCH for Calculations in Comparable Company Analysis\" width=\"982\" height=\"468\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-14.jpg 982w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-14-300x143.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-14-768x366.jpg 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/p>\n<p>In this case, we typically index a\u00a0<em>huge<\/em> range that has data and calculations for each company in this set, such as the area shown below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22015 size-large\" title=\"Calculations Sheet in Comparable Company Analysis\" src=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-15-1024x768.jpg\" alt=\"Calculations Sheet in Comparable Company Analysis\" width=\"1024\" height=\"768\" srcset=\"https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-15-1024x768.jpg 1024w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-15-300x225.jpg 300w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-15-768x576.jpg 768w, https:\/\/biwsuploads-assest.s3.amazonaws.com\/biws\/wp-content\/uploads\/2019\/04\/19075519\/Index-Match-Function-Excel-15.jpg 1128w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Once again, the key advantage is\u00a0<strong>flexibility.<\/strong><\/p>\n<p>By setting it up this way, if something ever changes, the same INDEX and MATCH functions will work.<\/p>\n<p>If we used HLOOKUP or VLOOKUP instead, we would have to change the row and column numbers, the starting and ending points of the range, and so on.<\/p>\n<p>Finally, the INDEX\/MATCH combo is great because they are both\u00a0<strong>non-volatile functions<\/strong>, meaning that they are not recalculated when something in the spreadsheet changes&#8230; unless that change directly affects those functions.<\/p>\n<p>By contrast, Excel will do a forced recalculate of HLOOKUP and VLOOKUP whenever something changes &#8211; even if it&#8217;s small and unrelated to them.<\/p>\n<p><strong>The Bottom Line:<\/strong> The Index Match Function Excel combination is one of the most powerful tools in your spreadsheet toolbox.<\/p>\n<p>Use it often and use it well, and you&#8217;ll save hours and hours in spreadsheets.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lesson, you\u2019ll learn the basic syntax for INDEX and MATCH, two of the most powerful functions in Excel, and you\u2019ll learn how to use them to create improved versions of the HLOOKUP and VLOOKUP functions.<\/p>\n","protected":false},"featured_media":29360,"template":"","class_list":["post-20327","biws_kb","type-biws_kb","status-publish","has-post-thumbnail","hentry","kb_category-excel"],"acf":[],"_links":{"self":[{"href":"https:\/\/breakingintowallstreet.com\/wp-json\/wp\/v2\/biws_kb\/20327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/breakingintowallstreet.com\/wp-json\/wp\/v2\/biws_kb"}],"about":[{"href":"https:\/\/breakingintowallstreet.com\/wp-json\/wp\/v2\/types\/biws_kb"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/breakingintowallstreet.com\/wp-json\/wp\/v2\/media\/29360"}],"wp:attachment":[{"href":"https:\/\/breakingintowallstreet.com\/wp-json\/wp\/v2\/media?parent=20327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}