

XLOOKUP(lookup_value,lookup_array,return_array,) HOWEVER, the XLOOKUP function makes it much easier to do this with the ‘if_not_found’ argument. Users familiar with the VLOOKUP function would often wrap the VLOOKUP statement inside an IFERROR function to return a friendly message. This can be somewhat ambiguous for users – what does this mean? is this an error? It’s therefore good practice to provide a more useful message. When the XLOOKUP function does not return a value, it displays the “#N/A” message in the cell. When we copy the formula into the other rows (remembering to specify absolute cell references), the Grades and GPA values are all correctly populated. When you press enter, you’ll see that the GPA value is automatically populated as well! This allows us to use a neat trick with XLOOKUP – returning multiple values with one formula. We have specified the range that covers both the Letter Grade and GPA values for the return array.

There is another thing to note about the equation. Note that we’ve added a value of 1 for the ‘match_mode’ argument, which will return the index of the next largest item if an exact match isn’t found. We can do it by entering this equation in C2: =XLOOKUP(B2,$F$3:$F$7,$G$3:$H$7,1) In the example below, we want to populate the grades that students will get based on their marks. For this, we’ll need to specify the ‘match_mode’. One of the more common uses of the advanced variations is when you need to look up an approximate match. The additional arguments are ‘if_not_found’, ‘match_mode’ and ‘search_mode’: =XLOOKUP(lookup_value,lookup_array,return_array,) XLOOKUP: Approximate Match However, XLOOKUP includes some very useful options to cater for more complex situations. The basic exact match shown in the example above meets most users’ needs. This overcomes a big limitation with VLOOKUP, as users often had to re-arrange their columns to get the lookup array on the left.

It is not available for Excel 2019 or prior versions.īefore we look at the XLOOKUP function itself, let’s just first clarify what the term ‘lookup’ in general means when referring to spreadsheets and databases. Note : XLOOKUP is only available in Excel for Microsoft 365. Once you’ve learned how the XLOOKUP function works and what it can be used for, you’ll wonder how you ever managed your spreadsheeting without it. If you’ve never used VLOOKUP before, then get ready to learn about an extremely powerful function. Bonus tip: Dependent drop-down list using XLOOKUP.Putting it all together: a guided XLOOKUP example.
