Working with large data sets is at all times tricky. Excel is one of the vital powerful tools you should utilize to govern, format, and analyze large sets of data.
Several well-known functions exist to show you how to look up specific matches inside a dataset, like VLookup.
But functions like VLookup had certain limitations, so Microsoft recently introduced the XLookup function to Excel. It provides a more robust method for locating specific values in a knowledge set.
Knowing the right way to use it effectively can drastically cut down the time you spend trying to investigate data in Excel.
What does XLookup do in Excel?
The core functionality of the XLookup is the flexibility to look for specific values in a spread or array of information. While you run the function, a corresponding value is returned from one other range or array.
Ultimately, it’s a search tool to your Excel datasets.
Depending in your arguments, XLookup will show you the primary or last value in instances with a couple of matching result.
Other lookup functions like VLookup (vertical lookup) or HLookup (horizontal lookup) have limitations, resembling only searching from right to left. Users have to either rearrange data or find complex workarounds to mitigate this.
XLookup is a much more flexible solution, allowing you to get partial matches, use a couple of search criteria and use nested queries.
Try this XLookup Excel tutorial to see it in motion:
The Advantages of XLookup in Excel
The important advantage of XLookup in Excel is the time savings it provides. You may achieve the search result without manipulating data positioning, for instance.
Like other Excel lookup formulas, it saves an enormous period of time that may otherwise must be spent manually scrolling through rows and rows of information.
On the subject of comparisons with other lookup functions, XLookup’s flexibility is essential. For instance, you should utilize wildcard characters to look for partial matches.
This helps to cut back errors overall, as you should utilize it to search out data that could be misspelled or entered incorrectly.
The arguments for XLookup are also simpler than VLookup, making it faster and easier to make use of. XLookup defaults to a precise match, for instance, whereas you would need to specify this in your VLookup argument.
The general functionality of XLookup is superior since it could possibly return multiple results directly. One example of this use case could be trying to find the highest five values in a selected dataset.
XLookup Required Arguments
Your XLookup function requires three arguments:
- Lookup_value: That is the worth you’re trying to find in an array.
- Lookup_array: That is the range of cells where you wish the return value to be displayed.
- Return_array: That is the range of cells where you wish the function to look for the worth.
So a straightforward version of an XLookup would appear like this:
=XLOOKUP(lookup_value, lookup_array, return_array)
XLookup Optional Arguments
The XLookup function also has several optional arguments which you could use for more complex scenarios or to narrow down your search:
- Match_mode: This determines the kind of match to make use of, resembling exact match or wildcard match to get partial matches.
- Search_mode: This determines whether your function should search from left to right or vice versa.
- If_not_found: This argument tells the function what value must be returned if there isn’t any match in any respect.
With optional arguments included, the XLookup function looks like this:
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
How you can Use XLookup in Excel
1. Open the Excel and the datasheet on which you need to use the XLookup function.
2. Select the cell where you need to place the XLookup Excel formula.
3. Type “=” into that cell after which type “XLookup.” Click on the “XLookup” option that comes up within the dropdown.
4. A gap parenthesis will routinely generate. After the opening bracket, enter the required arguments in the right order: lookup_value, lookup_array, and return_array.
This implies choosing the range of cells for every argument and placing a comma before moving on to the subsequent argument.
5. When you’re using any optional arguments, enter them after the required arguments.
6. When your XLookup arguments are complete, add a closing parenthesis before hitting enter.
7. The outcomes of your XLookup must be displayed within the cell where you entered the function.
On this Excel XLookup example, we used XLookup to search out out the grade for a selected student. So, the lookup_value was the scholar’s name (“Ruben Pugh”).
The lookup_array was the list of student names under column A. Finally, the lookup_return was the list of student grades under column C. With that formula, the function returned the worth of the scholar’s grade: C-.
But how do you employ XLookup with the optional arguments?
Using the identical data set as above, let’s say we wish to search out the attendance rate for a student with the surname “Smith.”
Here, we’re telling Excel to return the message “Not Found” if it cannot retrieve the worth, indicating that the scholar “Smith” just isn’t on this list:
Now, let’s say we wish to find out whether any students had an attendance rate of 70%. But we also need to know the subsequent closest attendance rate if 70% doesn’t exist within the dataset.
We’ll use the worth “1” under the match_mode argument to search out the subsequent largest item if 70 doesn’t exist:
Since no student has a 70% attendance rate, the XLookup has returned “75,” the subsequent largest value.
Best Practices for XLookup in Excel
Use Descriptive References
It’s preferable to make use of descriptive references for the cells you’re using relatively than generic ranges like A1:A12.
When it comes time to regulate your formula (which you are inclined to do often with a function like XLookup), descriptive references make it easier to grasp what you were originally using the formula to do.
This can be useful in case you pass the spreadsheet off to a recent user who needs to grasp the formula references quickly.
Use Exact Match Where Possible
Using the precise match default inside the formula (versus wildcard characters) helps make sure you don’t get unintended values within the return.
Wildcard characters are more useful for identifying partial matches, but the precise match is the most effective approach to make sure the formula works as intended.
Keep Argument Ranges the Same Size
When putting your arguments together, make certain that you simply use the identical variety of cells for the return_array and the look_up array. If not, you’ll get an error, and Excel will only return #VALUE within the cell.
Test Your Formula
It’s not difficult to repair problems with a straightforward XLookup. But in case you’re using nested functions or XLookup at the side of other formulas, make sure you’re testing all the things along the best way.
When you don’t and receive an error, it could possibly be difficult to work backward and discover where the function goes fallacious.
As a recent and improved approach to use lookup functionality in Excel, the XLookup outperforms the classic VLookup in multiple ways.
While the fundamentals of the function are easy to know, it could possibly take some practice to make use of XLookup in additional complex ways. But with some practice data and test scenarios to work on, you’ll master the XLookup very quickly.