FormulaCraft

How to look up and return multiple values in Excel and Google Sheets

Topic:Lookups (any direction)

Heads up: Excel and Google Sheets do this differently.

Excel
=IFERROR(INDEX(B2:B6,SMALL(IF(A2:A6="Alpha",ROW(A2:A6)-ROW(A2)+1),ROW()-ROW(C2)+1)),"")
Google Sheets
=FILTER(B2:B6,A2:A6="Alpha")

Verified example

Computed by a real spreadsheet engine on the sample data below.

CategoryItem
AlphaApple
BetaBanana
AlphaAvocado
GammaGrape
AlphaApricot

=IFERROR(INDEX(B2:B6,SMALL(IF(A2:A6="Alpha",ROW(A2:A6)-ROW(A2)+1),ROW()-ROW(C2)+1)),"")

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1In Google Sheets, enter =FILTER(B2:B6,A2:A6="Alpha") in an empty cell; results spill downward automatically.
  2. 2In Excel 365 use =FILTER(B2:B6,A2:A6="Alpha") — it works identically and also spills.
  3. 3In older Excel, enter the array formula =IFERROR(INDEX(B2:B6,SMALL(IF(A2:A6="Alpha",ROW(A2:A6)-ROW(A2)+1),ROW()-ROW(C2)+1)),"") with Ctrl+Shift+Enter, then copy it down as many rows as you expect matches.
  4. 4Replace "Alpha" with a cell reference (e.g. E2) to make the lookup value dynamic.

Tips

Need the Google Sheets version instead? Open Sheets variant in workspace →

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What happens when there are no matches?

Wrap FILTER in IFERROR to display a custom message: =IFERROR(FILTER(B2:B6,A2:A6="X"),"No results").

Can I return matches from multiple columns?

Yes — expand the return range to include all desired columns, e.g. =FILTER(A2:B6,A2:A6="Alpha").

More on Lookups (any direction)

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: