When deciding between which vertical lookup formula to use, the majority of Excel experts agree that INDEX MATCH is a better formula than VLOOKUP.
However, many people still resort to using VLOOKUP because it’s a
simpler formula. One major driver of this problem is that most people
still don’t fully understand the benefits of switching from VLOOKUP, and
without such an understanding, they are unwilling to invest the time to
learn the more complex formula. The purpose of this post is to
describe in detail all of the benefits of using INDEX MATCH and convince
you that you should use INDEX MATCH exclusively for all of your
vertical lookups.
If you don’t know how to use INDEX MATCH, please click here for a detailed tutorial.
Once you’ve learned INDEX MATCH and started using the formula
consistently, you’ll reduce the number of spreadsheet errors you make,
become more efficient in navigating Excel, and significantly improve
your ability to create complex Excel models that have a heavy database component.Dynamic Column Reference Leads to Fewer Errors
The key difference between INDEX MATCH and VLOOKUP is that VLOOKUP requires a static column reference while INDEX MATCH uses a dynamic column reference. With VLOOKUP, most people will input a specific, static number to indicate which column they want to return from. When you use INDEX MATCH, the formula allows you to manually choose which column you want to pull from.The reason this leads to fewer errors is because when you follow the INDEX MATCH syntax, you click directly on the field containing the value you want to return.
The next two advantages of using INDEX MATCH also come from the fact that VLOOKUP requires a static column reference input for the values you want to return. Please note that you could get around the static reference issue by using a formula within the VLOOKUP syntax, creating a combination formula such as VLOOKUP MATCH or VLOOKUP HLOOKUP. However, it’s much simpler just to learn INDEX MATCH and gain all the additional benefits beyond just having dynamic column reference.
Insert Column Immunity
The greatest benefit of using INDEX MATCH over VLOOKUP is the fact that, with INDEX MATCH, you can insert columns in your table array without distorting your lookup results. Any time you work with a large dataset, there’s a good chance you’ll need to go back to edit our columns and potentially insert a new column. With VLOOKUP, any inserted or deleted column that displaces your return values will change the results of your formulas.Take the VLOOKUP example below. Here, we’ve setup the formula to pull the State value from our data table. Because it is a VLOOKUP formula, we have referenced the 4th column.
Easier to Drag and Copy
When working with large datasets, it’s rare to write just a single lookup formula; you’re likely going to need to drag and copy your formula to multiple cells to perform multiple lookups. For example, let’s say that for a specific ID, I want to return a series of values from my table in the exact same order as they appear in the table. When I try to drag and copy the standard VLOOKUP formula across (with a reference lock on both the lookup value and the table array), the lookup doesn’t work because it just pulls the same value for each entry. This deficiency is again caused by VLOOKUP requiring a specific column reference input for your return values.No Array Restriction
Another key limitation of VLOOKUP is that it requires you to specify a square table array in which your column reference cannot move beyond. The key situation when this becomes a problem is when you append a new field to your dataset beyond your original table array. Consider the example below:Right to Left Lookup
One of the key benefits of using INDEX MATCH is being able to create lookup keys on the right side of your data table. New lookup keys are generally created by running calculations on fields within your original dataset. These keys represent your lookup column within the INDEX MATCH syntax. When using INDEX MATCH, you can append these new lookup keys to the right side of your table and perform a right-to-left lookup to pull the values you want to return. The INDEX MATCH syntax doesn’t care whether your lookup column is on the left or right side of your return column.Doubles as an HLOOKUP
This probably isn’t the biggest deal to most users, but it’s still worth mentioning. A VLOOKUP restricts you to only performing vertical lookups on a table array. I can’t, for example, lookup values across the top of my dataset and perform a horizontal lookup. To achieve this objective, I’d need to use a completely different formula.With INDEX MATCH, you can simply arrange both your lookup array and return array horizontally to perform an HLOOKUP. I don’t recommend doing horizontal lookups in general, but if you ever need to, you should definitely use the INDEX MATCH formula.
Lower Processing Need
The processing benefit of using INDEX MATCH has been marginalized in recent versions of Excel because the software’s processing capabilities have expanded so significantly. But just give everyone a brief history lesson I’ll elaborate upon this benefit. In some of Excel’s older versions, the software had tangible processing limitations that would be noticeable if you built a huge data set. In some situations, I was required to lookup values for thousands of rows so I could append a new column to a large table. Once I added all of these formulas, the software would freeze up and take several minutes to calculate the return values. I eventually had to replace my VLOOKUP formulas with INDEX MATCH to speed up the calculations.The reason for this difference is actually fairly simple. VLOOKUP requires more processing power from Excel because it needs to evaluate the entire table array you’ve selected. With INDEX MATCH, Excel only has to consider the lookup column and the return column. With fewer absolute cells to consider, Excel can process this formula much faster.
Again, please keep in mind that this benefit is probably no longer noticeable given the improvements made in Excel’s processing power. However, if for any reason you need to run thousands of lookup formulas within a spreadsheet, make sure to use INDEX MATCH.
Conclusion
The one disadvantage of using INDEX MATCH is that it is clearly harder to learn and more difficult to remember. Excel does not have the syntax built into the software and the syntax by itself is not intuitive. However, this hurdle can easily be resolved by reading a simple tutorial on how to use the formula.Making the switch from VLOOKUP to INDEX MATCH was one of the key steps I took to improve the quality of the Excel models I built. I now use INDEX MATCH exclusively for all of my vertical lookups. I do this not just because it’s a better formula, but also because it helps me remember the more complex syntax. Once you’ve made the switch, and experienced the benefits of using INDEX MATCH, I promise you that you won’t go back to VLOOKUP.




0 comments:
Post a Comment