Retrieve Multiple Values with VLOOKUP: FILTER, XLOOKUP, and INDEX/SMALL

Retrieve multiple values with VLOOKUP

Retrieve Multiple Values with VLOOKUP: Practical FILTER, XLOOKUP, and INDEX/SMALL Patterns

Retrieving multiple values with VLOOKUP is not possible with its basic functionality alone. However, with FILTER, XLOOKUP, and INDEX+SMALL patterns, you can spill all results associated with one key or return only the top N results.

Quick Fix: Spill All Matches

=FILTER(ReturnRange, KeyRange=H2, "")

Return All Multiple Results with FILTER

=FILTER($C$2:$C$1000, $B$2:$B$1000=$H$2, "")
=UNIQUE(FILTER($C$2:$C$1000, $B$2:$B$1000=$H$2, ""))

Top N Results, Sorting, and Additional Criteria

=TAKE(SORT(FILTER($C$2:$D$1000, $B$2:$B$1000=$H$2, ""),2,FALSE), 3)

XLOOKUP+FILTER with Multiple Criteria

=FILTER($C$2:$D$1000, ($B$2:$B$1000=$H$2)*(TEXT($A$2:$A$1000,"yyyymm")=TEXT($H$3,"yyyymm")), "")

Legacy Alternative (No Dynamic Arrays)

=IFERROR(SMALL(IF($B$2:$B$1000=$H$2, ROW($B$2:$B$1000)), ROW(A1)), "")
=IFERROR(INDEX($C$2:$C$1000, F2-ROW($C$2)+1), "")

Related Articles


References: Microsoft – FILTER function, Microsoft – XLOOKUP

1 thought on “Retrieve Multiple Values with VLOOKUP: FILTER, XLOOKUP, and INDEX/SMALL”

  1. Pingback: XLOOKUP Wrong Record? Find and Fix Duplicate Lookup Keys

Leave a Reply

Your email address will not be published. Required fields are marked *