XLOOKUP is a new, advanced replacement for all the lookup functions in Excel, but Google sheets lack this function yet.
But worry not, this article is to help all those Google Sheets users out with XLOOKUP Function in Google Sheets.
What is XLOOKUP Function?
XLOOKUP Function is basically used in Excel to look up the value of a particular entity. Say, you have a list of all the employees in your company and you would like to get information regarding an employee. Now, instead of searching manually through the list, you can simply use the XLOOKUP Function to obtain all the required information.
Why XLOOKUP Function?
So basically, using XLOOKUP Function, finding the values in a table or a range of values by row and returning the corresponding value in the column becomes an easy task.
Hence, looking at the alternatives for this quite important function in Google Sheets is beneficial.
How to use XLOOKUP Function in Google Sheets?
So the Syntax for XLOOKUP Function is:
=XLOOKUP(lookup_value, lookup_array, return_array)
Now, we will try using alternative methods to use XLOOKUP Function in Google Sheets.
Here is a free spreadsheet template for hands-on experience with the different methods.
For example, we have the following data for the list of employees.
Using FILTER Function
The FILTER Function in Google Sheets is the closest to the XLOOKUP Function.
Syntax for FILTER Function
=FILTER(range, condition 1, [condition 2, .])
So the range here refers to the range where the value you want exists, and condition 1 is the range of the value you are looking up for.
Now, you can create a DROPDOWN in Google Sheets for the Name of employees.
Next, select a cell and add the following Syntax for the Employee Number in cell G6:
=FILTER(C3:C9, A3:A9 = G4)
Hence, the spreadsheet would now look like this.
You can simply use the FILTER Function to replace the XLOOKUP Function in Google Sheets.
You can always use VLOOKUP Function In Google Sheets in place of the XLOOKUP Function. XLOOKUP Function is basically an advanced version of the VLOOKUP/HLOOKUP Function.
Syntax for VLOOKUP Function
=VLOOKUP(search_key, range, index, [is_sorted])
So, first, you need to add the cell corresponding to the value you are looking for, followed by the total range of the data, i.e., A3:D9 in our case, and then the column number from where you want the value to return, followed by a true/false value depending on whether to get an exact match of the value or not.
Hence, the Syntax for the VLOOKUP Function becomes:
Using the INDEX and MATCH Function In Google Sheets
You can also use the INDEX and MATCH functions in Google Sheets to get the required information.
This can be simply achieved by Indexing the entire range where you are looking for the value to be returned and then matching the row using the lookup value in cell G4.
The Syntax for MATCH Function is as follows:
=MATCH(search_key, range, search_type)
The Syntax for the INDEX Function is as follows:
=INDEX(reference, [row], [column])
Syntax for INDEX/MATCH Function
Here, you are indexing column C where the employee numbers are stored, and then you match the value of G4(i.e. Our lookup value) with the range of A3:A9 which contains the names of your employees, and a 0 to indicate looking for an exact match.
XLOOKUP Function proves to be a very useful tool when trying to look for a particular value in a huge amount of data. Thankfully, there are many alternatives available to using XLOOKUP Function in Google Sheets.
Hope this article helped you!
Want to know more formulas and functions in Google Sheets? Look at our definitive guide on Google Sheets which covers hundreds of such topics here. Enjoy reading!
How to use the CHOOSE Function in Google Sheets: Learn how to use the CHOOSE Function in Google Sheets in three simple examples.
How to use the SORTN Function in Google Sheets: Learn about the SORTN Function in Google Sheets in this 5 minutes easy guide.
How to Rank data in Google Sheets using the RANK Function: Learn how to use the RANK Function in Google Sheets in just two easy steps.