# XLOOKUP, VLOOKUP or INDEX/MATCH? Big Lookup Functions Guide!

One of the most often used functions when creating an Excel model is consolidating data from different sources. Traditionally, there were 3 major functions for combining data from different tables or worksheets: VLOOKUP, SUMIFS and INDEX/MATCH. Now, Microsoft has introduced XLOOKUP. So what is the difference between these four lookup functions and which one should you use?

## Overview of the four lookup functions

Let’s take a look at each of the four functions separately, before we eventually compare them and see, which one of them to use in what case.

### VLOOKUP

VLOOKUP is probably the best known formula for getting data from another table. The application is fairly easy, although there are some common mistakes which people tend to make. The VLOOKUP formula has four parts (“arguments”):

1. The lookup value.
2. The range, where you are going to search in (Excel searches in the left-most column from this range).
3. The number of column, which you want to be returned (start counting from the left column of the search range).
4. One optional value, which you can always consider to be “FALSE”

Make sure that you don’t make the most common mistakes as having a too small range (search column as well as return column must be within the search range) and start counting the search column as column number 1.

### SUMIFS

SUMIFS only exists since Excel 2007 and is especially useful, as it can regard several search criteria. Also, this application is quite straightforward:

1. The column, which the return value is in
2. The column, which your criteria is in
3. The lookup value
4. Optional: Second criteria column
5. Optional: Second lookup value

The primary function of SUMIFS is to sum up values matching your criteria. In our case, we must make sure that each criteria combination only exists once in our table. In the example on the right hand side, we would have exactly this problem: There are 3 VW Golfs in our table, so the return value is the sum of the 3 prices.

### INDEX/MATCH

A combination of the two functions index and match has one more advantage than the VLOOKUP: It returns the value from any column and not just on the right hand side of the search column. That usually makes it more stable, because the return column stays the same if you insert more columns in-between.

The INDEX formula returns the n-th value from an array of cells. With MATCH, you can search for a value within an array of cells and it’ll return the number of the first occurrence. Please refer to number 3 in above picture for an example of how to use it.

### XLOOKUP

XLOOKUP is the newest addition to the lookup functions in Excel. It solves many problems of VLOOKUP and even INDEX/MATCH. At the same time, it’s comparatively easy to use. Here is the basic structure:

The first three arguments are quite straight forward – the arguments 4 to 6 are optional.

1. Search value: What do you look for?
2. Search area: Where to you look (for example a column or row)?
3. Return area: Where is the return value, can also be a column or row (but should have the same shape as the search area.

Here is a simple XLOOKUP example:

## Comparison of the lookup functions VLOOKUP, SUMIFS, INDEX/MATCH and XLOOKUP

In the below you can find a comparison of the four functions.

• XLOOKUP and SUMIFS can be applied rather easily, whereas the INDEX/MATCH combination is – at least for beginners – more difficult.
• All of the lookup functions can return numbers as their return value.
• Unfortunately, SUMIFS cannot return a text as the return value. That means, if you need to return a text, SUMIFS is out of the game.
• The return column for the VLOOKUP must be on the right hand side of the search column. Of course, there are workarounds: Changing the order of the columns or duplicating the return column. There is even an array version of VLOOKUP, but this is quite complicated and not recommended.
• VLOOKUP as well as INDEX/MATCH return the value first in the list. If your search value appears a second time, the second occurrence won’t be regarded. SUMIFS returns the sum. XLOOKUP, however, can return either the first value found (default) or the last.
• XLOOKUP, SUMIFS and INDEX/MATCH are rather stable, as they will still work if you change any column order or delete/ insert columns.
• SUMIFS is the only of the four lookup functions, which can by default regard several search criteria. If you want to search for more than one criteria with one of the other two functions the best way would be to insert a column with a ‘primary key’. This key combines all the search columns into one column. You then only search within this column.

Do you want to boost your productivity in Excel?

Get the Professor Excel ribbon!

Add more than 120 great features to Excel!

## When to use which of the lookup functions

### Situation 1: Not everyone around you has access to newer Excel versions and therefore cannot use XLOOKUP

First question: Do you and your co-workers / clients etc. have newer Excel versions (Microsoft 365). If you are not sure, it’s probably not the right time to use XLOOKUP yet. In such case, follow this decision tree:

If your return value is a numeric value (like a number or date), SUMIFS has a some advantages (as shown in the table above) and we recommend using it. If you return value is text, both VLOOKUP and the INDEX-MATCH combination work. The following decisions are then no exclusion criterions but rather matters of convenience.

One more word to the case in which you got more than one search criteria and want to return text: In such case we recommend using a new search column, which combines all the search criteria. For instance, if you are searching for a person by first name and family name and want to return the address, you can concetanate first name and family name into one cell. That way you only have to search for the complete name within one column.

### Situation 2: You can assume that all collaborators have access to XLOOKUP

Well, in such case it’s actually much easier: