Table of Contents
Choose an Excel lookup by the result you need: use XLOOKUP for one matching record, LET when you reuse its result in a formula, INDEX with MATCH for compatibility with older workbooks, and FILTER when you need every matching row. None is always the fastest; range size, calculation design and workbook structure matter.
The examples below use a separate Data worksheet with records in rows 2–1000. A contains IDs, AC contains ratings, F contains a return value, D:F contains details, and I contains a manager name. Put the lookup ID in A2 on a different results sheet. Adjust these references to your actual layout.
1. Reuse an XLOOKUP result with LET
LET gives a name to an intermediate result within a formula. That avoids repeating the same lookup when several conditions depend on it.
=LET(rating,XLOOKUP(A2,Data!$A$2:$A$1000,Data!$AC$2:$AC$1000),IF(rating=5,"Top Tier",IF(rating=1,"On Watchlist","Standard")))Here, XLOOKUP finds A2 in the ID column and returns the corresponding rating. The final IF expression uses the named result. The labels are only an example of how to map values, not a recommendation for evaluating people.

If the ID is missing, this example returns a lookup error instead of silently classifying it as Standard. Decide how missing IDs should be handled before adding an error fallback. Keep errors visible while testing.
2. Use INDEX and MATCH for an exact lookup
=INDEX(Data!$F$2:$F$1000,MATCH(A2,Data!$A$2:$A$1000,0))MATCH returns the position of the ID within A2:A1000; INDEX retrieves that position from F2:F1000. The final 0 requests an exact match. Both ranges must start and end on corresponding rows.

This combination works in older Excel versions without XLOOKUP. It is also useful when you want explicit control over the lookup and return ranges. It is not automatically faster than XLOOKUP simply because it uses separate columns: XLOOKUP can use bounded columns too.
If IDs are duplicated, this exact-match pattern returns the first match. Use a unique key or choose an all-matches approach when duplicates are meaningful.
3. Return all matching rows with FILTER
To return details for every row assigned to a manager, use:
=FILTER(Data!$D$2:$F$1000,Data!$I$2:$I$1000="Peter O'Neill","No employees found")The name in the condition must match the stored text. Peter O'Neill and Peter Oneill are different values. Referencing a criteria cell instead of typing the name directly can make the formula easier to reuse.

FILTER returns a dynamic array that spills into neighboring cells. Leave enough empty space for all rows and columns; blocked output can cause a #SPILL! error. The third argument supplies a message when no rows match.
Check compatibility and correctness first
- Version: LET, XLOOKUP and FILTER require a supporting Excel version, such as Microsoft 365 or Excel 2021 or later. INDEX/MATCH is suitable for older versions.
- Data types: an ID stored as text may not match an ID stored as a number. Check leading spaces and meaningful leading zeros.
- Ranges: use matching boundaries and exclude unrelated rows. Avoid whole-column arrays unless there is a reason to use them.
- Testing: check a known match, a missing value and a duplicate before filling the formula down.
If your regional settings require semicolons, use them instead of the commas shown here. For additional approaches, see Excel functions for finding data and named ranges for clearer formulas.
Reader Comments 0
Sign in with email or Google to join the discussion.