Lookup, Index, Offset and Match Functions
- 02:48
Understand how to summarize data into a table
Downloads
No associated resources to download.
Glossary
Array Data Extraction TableTranscript
Excel is often awash with data that we'd much rather summarize into a small table. But looking up that data from a very, very large table can be very difficult. However, there are a lot of functions there to help you. And we've got some of them here on the screen. Vlookup, Hlookup, and then you can combine those lookups with a Match function or you can use an Index function and Match and an Offset function and Match. So let's have a look at these in a bit more detail. The Vlookup, first of all, starts off with what do you want to look up? I may want to look up a company name. It then says, where do you want to look it up? The table array. So I set the parameters, maybe I want to look within four columns and 100 rows down. It then says, great, I'll look in that first column, but which column do you want me to return? So the column index number could be column three. That's great. So if I found the company name in the first column, I don't actually want the company's name returned, I might want their sales or their profit returned from a different column. Index does something very similar. The order of it is just slightly different. You firstly start off with your table of array, where should I look? And it then says, how many rows down and how many columns to the right should I go? Offset, again, does something quite similar. But instead of starting with the parameters of your table I look within this table, Offset just asks for a reference cell, a starting point, and then says how many rows down and how many columns to the right should I go? So all very useful, but imagine into that Offset, I hard coded in two rows down and two columns to the right. That wouldn't be very flexible. Every time I wanted to change it, I'd have to go into the formula and change the number of rows and change the number of columns. So instead, we can automate this using the Match function. The Match function says, I will look for whatever you determine, maybe a company name, and I'll look for it within a table. So what I could do is I could write my Offset function and where it says rows, I could replace that with a Match function. So if I was looking for a company name and that company name was two rows down, it would return the number two. I could also use a Match function to replace the cols or columns part of the Offset function. I could go looking for the word profit. I might find profit three columns to the right and so it would return the number three. So just as the Match function has been used to find the rows and columns in the offset function, we can do exactly the same in the index function and the Vlookup function as well. Although we haven't looked at it here, the Hlookup function is very similar to the Vlookup function, but instead of asking you for a column index number, instead it asks you for a row index number and it would then go down the number of rows you've found.