In this Excel XLookup Return All Matches Tutorial, you learn how to create an Excel XLookup return all matches formula.
The Excel XLookup return all matches formula template/structure you learn below relies on the FILTER function. FILTER is available in Excel 2021 and later (including Excel 365).
This Excel XLookup Return All Matches Tutorial is accompanied by an Excel workbook with the data and formulas I use. Get this example workbook (for free) by clicking the button below.
Table of Contents
Related Excel Training Materials and Resources
The following Excel VLookup Tutorials may help you better understand the differences between the XLOOKUP and VLOOKUP functions (XLOOKUP vs. VLOOKUP).
- Excel VLOOKUP Tutorial (under development): Click here to open.
- Excel VLOOKUP from Another Sheet: Click here to open.
- Excel VLOOKUP Compare 2 Columns and Find Matches: Click here to open.
- Excel VLookup Sum Multiple Row Values (in Same Column): Click here to open.
- Excel VLOOKUP Multiple Columns: Click here to open.
- Excel VLOOKUP Sum Multiple Columns (Values): Click here to open.
- Excel VLookup Sum Multiple Column Values (with XLOOKUP): Click here to open.
- Excel VLookup Sum Multiple Rows and Columns: Click here to open.
- Excel VLookup Multiple Criteria with INDEX MATCH: Click here to open.
- Excel VLookup Multiple Criteria with XLOOKUP: Click here to open.
- Excel VLookup Multiple Criteria with the FILTER Function: Click here to open.
- Excel VLOOKUP Return Multiple Values with Helper Column: Click here to open.
- Excel VLookup Return Multiple Values with the INDEX Function: Click here to open.
- Excel VLookup Return Multiple Values with the FILTER Function: Click here to open.
- Excel VLookup Return Multiple Values in One Cell Separated by a Comma: Click here to open.
- Excel VLOOKUP Multiple Sheets: Click here to open.
- Excel VLOOKUP Multiple Sheets in Different Workbook: Click here to open.
- Excel VLOOKUP Sheet in Multiple Different Workbooks: Click here to open.
This Excel XLookup Return All Matches Tutorial is part of a more comprehensive series of Excel XLOOKUP Tutorials.
- Excel XLOOKUP Tutorial: Click here to open.
- Excel XLOOKUP in Table: Click here to open.
- Excel Nested XLOOKUP (Dynamic Lookup Value): Click here to open.
- Excel XLOOKUP If Not Found Return Blank: Click here to open.
- Excel IF XLOOKUP (for Error Handling): Click here to open.
- Excel XLOOKUP If Blank Return Blank: Click here to open.
- Excel XLOOKUP Wildcard: Click here to open.
- Excel XLOOKUP Between 2 Values: Click here to open.
- Excel XLookup Return All Matches: Click here to open.
You can find more Excel and VBA Tutorials in the organized Tutorials Archive: Click here to visit the Archives. The following are some of my most popular Excel Tutorials and Training Resources:
- Excel Keyboard Shortcuts Cheat Sheet: Click here to open.
- Excel Power Query (Get & Transform) Tutorial for Beginners: Click here to open.
- Excel Macro Tutorial for Beginners: Click here to open.
If you want to learn more about Excel essentials, Excel formulas, and similar Excel topics, you may be interested in taking one (or more) Excel Courses: Click here to learn more about these Excel Courses (affiliate link).
If you want to learn how to automate Excel (and save time) by working with macros and VBA, you may be interested in the following Premium Excel Macro and VBA Training Materials:
- Premium Courses at the Power Spreadsheets Academy: Click here to open.
- Books at the Power Spreadsheets Library: Click here to open.
If you need help with Excel tasks/projects, you may be interested in working with me: Click here to learn more about working with me.
Excel XLookup Return All Matches Formula Template/Structure
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/excel-xlookup-all-matches/
=FILTER(ColumnOrRowWithValuesToReturn,ColumnOrRowWhereYouSearch=LookupValue)
Step-by-Step Process to Create an Excel XLookup Return All Matches Formula
(1) Call the FILTER function.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/excel-xlookup-all-matches/
=FILTER(...)
(2) Use the first argument of the FILTER function (array) to specify the return array. This is the column (when doing a VLookup) or row (when doing an HLookup) with the value to return.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/excel-xlookup-all-matches/
=FILTER(ColumnOrRowWithValuesToReturn,...)
(3) Set the second argument of the FILTER function (include) to an expression with the following 3 items:
- The column (when doing a VLookup) or row (when doing an HLookup) where you search for the lookup value (the lookup array).
- The equal to comparison operator (=).
- The value you search for in the column (when doing a VLookup) or row (when doing an HLookup) you search in (the lookup value).
Ensure the number of rows (when doing a VLookup) or columns (when doing an HLookup) of the lookup array (you specify in this step #3) is the same as that of the return array (you specified in step #2).
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/excel-xlookup-all-matches/
=FILTER(ColumnOrRowWithValuesToReturn,ColumnOrRowWhereYouSearch=LookupValue)
How (and Why) the XLookup Return All Matches Formula Works
The XLOOKUP function:
- Searches a range or array for a match; and
- Returns the corresponding item(s) from a second range or array.
XLOOKUP returns the item(s) corresponding to a single (the first) match.
You can (however) work with the FILTER function to return all matches (create an Excel XLookup return all matches formula). The FILTER function:
- Filters an array based on the criteria (for example, a lookup value) you specify; and
- Returns an array with all applicable (filtered) matches.
Excel XLookup Return All Matches Example Formula
This Excel XLookup Return All Matches Tutorial is accompanied by an Excel workbook with the data and formulas I use. Get this example workbook (for free) by clicking the button below.
Excel XLookup Return All Matches Example Worksheet
The example worksheet has 3 tables/sections with the following characteristics:
(1) Table 1 (cells A6 to H26).
The table:
- With the data.
- Where I search with the XLookup return all matches example formula.
(2) Lookup value (cells J6 and K6).
The lookup value (Salesperson 8) is stored in cell K6.
(3) XLookup return all matches example formula (cells J8 to K13).
- Cell J9 stores the XLookup return all matches example formula.
- Cells J9 to J13 display the results. This is because:
- The array returned by the XLookup return all matches example formula has 5 items; and
- Results spill from cell J9 into cells J10 to J13.
- Cell K9 displays the XLookup return all matches example formula I enter in cell J9.
Excel XLookup Return All Matches Example Formula
The XLookup return all matches example formula stored in cell J9 is as follows:
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/excel-xlookup-all-matches/
=FILTER(H7:H26,A7:A26=K6)
The lookup value (stored in cell K6) is “Salesperson 8”.
This value is found in the following rows of the column I search in with the XLookup return all matches example formula (column A, cells A7 to A26):
- Row 8 (cell A8).
- Row 12 (cell A12).
- Row 17 (cell A17).
- Row 22 (cell A22).
- Row 25 (cell A25).
Download the Excel XLookup Return All Matches Example Workbook
This Excel XLookup Return All Matches Tutorial is accompanied by an Excel workbook with the data and formulas I use. Get this example workbook (for free) by clicking the button below.
Related Excel Training Materials and Resources
The following Excel VLookup Tutorials may help you better understand the differences between the XLOOKUP and VLOOKUP functions (XLOOKUP vs. VLOOKUP).
- Excel VLOOKUP Tutorial (under development): Click here to open.
- Excel VLOOKUP from Another Sheet: Click here to open.
- Excel VLOOKUP Compare 2 Columns and Find Matches: Click here to open.
- Excel VLookup Sum Multiple Row Values (in Same Column): Click here to open.
- Excel VLOOKUP Multiple Columns: Click here to open.
- Excel VLOOKUP Sum Multiple Columns (Values): Click here to open.
- Excel VLookup Sum Multiple Column Values (with XLOOKUP): Click here to open.
- Excel VLookup Sum Multiple Rows and Columns: Click here to open.
- Excel VLookup Multiple Criteria with INDEX MATCH: Click here to open.
- Excel VLookup Multiple Criteria with XLOOKUP: Click here to open.
- Excel VLookup Multiple Criteria with the FILTER Function: Click here to open.
- Excel VLOOKUP Return Multiple Values with Helper Column: Click here to open.
- Excel VLookup Return Multiple Values with the INDEX Function: Click here to open.
- Excel VLookup Return Multiple Values with the FILTER Function: Click here to open.
- Excel VLookup Return Multiple Values in One Cell Separated by a Comma: Click here to open.
- Excel VLOOKUP Multiple Sheets: Click here to open.
- Excel VLOOKUP Multiple Sheets in Different Workbook: Click here to open.
- Excel VLOOKUP Sheet in Multiple Different Workbooks: Click here to open.
This Excel XLookup Return All Matches Tutorial is part of a more comprehensive series of Excel XLOOKUP Tutorials.
- Excel XLOOKUP Tutorial: Click here to open.
- Excel XLOOKUP in Table: Click here to open.
- Excel Nested XLOOKUP (Dynamic Lookup Value): Click here to open.
- Excel XLOOKUP If Not Found Return Blank: Click here to open.
- Excel IF XLOOKUP (for Error Handling): Click here to open.
- Excel XLOOKUP If Blank Return Blank: Click here to open.
- Excel XLOOKUP Wildcard: Click here to open.
- Excel XLOOKUP Between 2 Values: Click here to open.
- Excel XLookup Return All Matches: Click here to open.
You can find more Excel and VBA Tutorials in the organized Tutorials Archive: Click here to visit the Archives. The following are some of my most popular Excel Tutorials and Training Resources:
- Excel Keyboard Shortcuts Cheat Sheet: Click here to open.
- Excel Power Query (Get & Transform) Tutorial for Beginners: Click here to open.
- Excel Macro Tutorial for Beginners: Click here to open.
If you want to learn more about Excel essentials, Excel formulas, and similar Excel topics, you may be interested in taking one (or more) Excel Courses: Click here to learn more about these Excel Courses (affiliate link).
If you want to learn how to automate Excel (and save time) by working with macros and VBA, you may be interested in the following Premium Excel Macro and VBA Training Materials:
- Premium Courses at the Power Spreadsheets Academy: Click here to open.
- Books at the Power Spreadsheets Library: Click here to open.
If you need help with Excel tasks/projects, you may be interested in working with me: Click here to learn more about working with me.