Table of Contents
XLOOKUP is a powerful function in Excel that allows users to easily find and retrieve data in a spreadsheet. One of its key features is the ability to return all matches for a specific search criterion. This means that users can search for a particular value and have XLOOKUP return all instances of that value within a given range. This functionality is particularly useful when dealing with large datasets or when searching for multiple occurrences of a specific value. With XLOOKUP, users can efficiently extract the desired information and save time and effort in data analysis.
Excel: Use XLOOKUP to Return All Matches
By default, the XLOOKUP function in Excel looks up some value in a range and returns a corresponding value only for the first match.
However, you can use the FILTER function instead to look up some value in a range and return corresponding values for all matches:
=FILTER(C2:C11, E2=A2:A11)
This particular formula looks in the range C2:C11 and returns the corresponding values in the range A2:A11 for all rows where the value in C2:C11 is equal to E2.
The following example shows how to use this syntax in practice.
Example: Use XLOOKUP to Return All Matches
Suppose we have the following dataset in Excel that shows information about various basketball teams:

Suppose we use the following formula with XLOOKUP to look up the team “Rockets” in column A and return the corresponding points value in column C:
=XLOOKUP(E2, A2:A11, C2:C11)
The following screenshot shows how to use this formula in practice:

The XLOOKUP function returns the value in the “Points” column for the first occurrence of Rockets in the “Team” column, but it fails to return the points values for the other two rows that also contain Rockets in the “Team” column.
To return the points values for all rows that contain Rockets in the “Team” column, we can use the FILTER function instead.
Here’s the exact formula we can use:
=FILTER(C2:C11, E2=A2:A11)

Notice that the FILTER function returns all three points values for the three rows where the “Team” column contains Rockets.

Related:
The following tutorials explain how to perform other common operations in Excel:
Cite this article
stats writer (2024). How can XLOOKUP be used to return all matches in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-xlookup-be-used-to-return-all-matches-in-excel/
stats writer. "How can XLOOKUP be used to return all matches in Excel?." PSYCHOLOGICAL SCALES, 26 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-xlookup-be-used-to-return-all-matches-in-excel/.
stats writer. "How can XLOOKUP be used to return all matches in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-xlookup-be-used-to-return-all-matches-in-excel/.
stats writer (2024) 'How can XLOOKUP be used to return all matches in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-xlookup-be-used-to-return-all-matches-in-excel/.
[1] stats writer, "How can XLOOKUP be used to return all matches in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can XLOOKUP be used to return all matches in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
