Spreadsheet Practice

How to return the first 3 matches with FILTER in Excel

Excel formula

=TAKE(FILTER(A2:C12,B2:B12=F1),F2)

Wrap FILTER in TAKE: =TAKE(FILTER(A2:C12,B2:B12=F1),F2) returns only the first F2 matching rows.

Result on the example
a 3-row list that spills from E4 in E4
Works in
Excel 2024 and Microsoft 365
Google Sheets
Different formula, see below

See it work

The formula is already in E4. Change any input and the result updates, or edit the formula to experiment.

How it works

FILTER returns all six Billing tickets, oldest first because that's the list order. TAKE keeps the first F2 rows of that result. The queue moves up on its own when a ticket is removed from the list. Google Sheets has no TAKE; ARRAY_CONSTRAIN does the same with a row and a column limit.

=TAKE(FILTER(A2:C12,B2:B12=F1),F2)

Result{3 rows × 3 cols} "T-501", "Billing", 46237, "T-503", …

  1. A2:C1211 rows × 3 cols: "T-501", "Billing", 8/3/2026, "T-502", …

    A range: 11 rows × 3 columns.

  2. B2:B1211 rows × 1 col: "Billing", "Tech", "Billing", "Billing", …

    A range: 11 cells in one column.

  3. F1"Billing"

    The value in F1.

  4. B2:B12=F1{11 rows × 1 col} TRUE, FALSE, TRUE, TRUE, …

    The = operator tests whether the two sides are equal.

  5. FILTER(A2:C12,B2:B12=F1){6 rows × 3 cols} "T-501", "Billing", 46237, "T-503", …

    FILTER: Rows of a range that meet every condition. #N/A when none match.

    • rangeA2:C1211 rows × 3 cols: "T-501", "Billing", 8/3/2026, "T-502", …
    • condition1B2:B12=F1{11 rows × 1 col} TRUE, FALSE, TRUE, TRUE, …
  6. F23

    The value in F2.

  7. TAKE(FILTER(A2:C12,B2:B12=F1),F2){3 rows × 3 cols} "T-501", "Billing", 46237, "T-503", …

    TAKE: First (or last, if negative) rows or columns.

    • arrayFILTER(A2:C12,B2:B12=F1){6 rows × 3 cols} "T-501", "Billing", 46237, "T-503", …
    • rowsF23

In Google Sheets

Google Sheets needs a different formula: =ARRAY_CONSTRAIN(FILTER(A2:C12,B2:B12=F1),F2,3). On the same data it gives the same result. Here it is running in Google Sheets mode.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=TAKE(SORT(FILTER(A2:C12,B2:B12=F1),3,-1),F2)Excel onlyspills 3 × 3Different resultSort before taking to get the newest matches instead. The three newest Billing tickets: T-511, T-509, T-507.
=TAKE(FILTER(A2:C12,B2:B12=F1),-F2)Excel onlyspills 3 × 3Different resultA negative count takes from the end: the last three matches. T-507, T-509 and T-511.

Common mistakes

  • If fewer rows match than you ask for, TAKE returns what there is, without an error. ARRAY_CONSTRAIN in Google Sheets does the same.
  • TAKE needs Excel 2024 or Microsoft 365. In Excel 2021, use INDEX(FILTER(…),SEQUENCE(F2),{1,2,3}).

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Return the first 3 matches with FILTER

In E4, return the first F2 tickets (all three columns) for the team in F1, in list order.

Questions

How do I return just the first match?

Take one row, =TAKE(FILTER(A2:C12,B2:B12=F1),1), or use XLOOKUP for a single value.

How do I return only some columns of the first matches?

Add CHOOSECOLS: =CHOOSECOLS(TAKE(FILTER(A2:C12,B2:B12=F1),F2),1,3).

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.