The INDEX and MATCH together in Google Sheets come useful if you want to perform lookups. Show
Table of Contents
Using the INDEX and MATCH together in Google Sheets performs similarly to like HLOOKUP and VLOOKUP, but even better (which we will get into later in the post below). This function requires two functions which are the INDEX and MATCH. Now, yes, one is nested inside another, which may lead some users to find them hard to use, but having complex functions is the gateway to more advanced use of the Google Sheet formulas. Lets take a closer look at the formula by breaking it down: The INDEX function is one of the mostly-used functions in Google Spreadsheet. It gets the value at a given location in a list or table. For example, you have created a seating plan for the class, and you want to get the first name of the 8th student with a formula. Using the INDEX function, you can do as follows =INDEX(A2:A11, 8) Upon hitting the Enter key, it will give you the resulting value, Mark. In the given situation, we are trying to find the first name of the 8th student in the class. Using the INDEX function, we selected the values under the First Name column, which will be the cell range A2:A11. Since we are looking for the 8th student, we, therefore, placed the number 8 after the comma (separator). You will better appreciate the INDEX function once, especially when you are dealing with thousands of information, and you have to look out for a specific position. The MATCH function, on the other hand, has the sole purpose of finding the numeric position of a given item in a list. Hows this? Its simple. Given the previous examples information, lets find out Lizas position. Using this MATCH function, it will yield to the value of 5. To interpret the value, it would merely mean that Liza is the 5th student. We wanted to see Lizas position in the class. Therefore, we typed in her name. Then, we will select the list where we want to get our data. In this case, since we are looking for Liza (first name basis), we chose the range cell range A2:A11. Ultimately, we added the value, 0, which means we want to obtain the result of an exact match. Contrary to just using 0, you also have the options 1 (default, if not provided 0) and -1 where the former and the latter both work when were dealing a sorted range of data, and we wish to return either the largest value or equal to the search_key or smallest value or equal to the search_key. We will get into this more when we explore the anatomy of both the INDEX and MATCH functions. The Anatomy of the INDEX and MATCH FunctionThe way we write the INDEX and MATCH together in Google Sheets is by nesting one inside the other. Heres how it will look like: =INDEX(reference, MATCH(search_key, range, match type))Lets break this function down and understand it:
A Few Notes When Using the MATCH Function
Approximations are also used, especially when you are trying to find out the best match in a set of values. A Few More Reminders to Make Your INDEX and MATCH Function Work Perfectly
A Real Example of Using INDEX and MATCH FunctionLets focus on the example below to see how INDEX and MATCH Function are used in Google Sheets. As shown above, we are given a list of 10 salespeople and their corresponding sales in the last three months of 2019. Our goal is to know how much was produced by a salesperson in a specific month. Lets see what we did to achieve this goal:
Hopefully, the above can clear any confusion or doubt you may have had. You may make a copy of the spreadsheet using the link I have attached below: Make a copy of example spreadsheet Have a feel on how to work with this formula. Try it out for yourself. Once youve understood it, lets jump right into writing and using the INDEX and MATCH together in Google Sheets. How to Use the INDEX and MATCH Together in Google Sheets
Your formula in the cell F5 should look like this: Test out this formula by typing in another name and changing the month. See the difference! At first, it may seem complicated, but when youre used to the INDEX and MATCH function, you will surely love its magic. Again, we recommend that you make a copy of the spreadsheet and try playing around with it, tweaking it and testing how the function works. Thats it. Well done! You can now use the INDEX and MATCH together in Google Sheets along with the other numerous Google Sheets formulas to create even more powerful formulas that can make your life much more comfortable. Get emails from us about Google Sheets.Our goal this year is to create lots of rich, bite-sized tutorials for Google Sheets users like you. If you liked this one, you'll love what we are working on! Readers receive early access to new content. Subscribe |