# How to return the first 3 matches with FILTER in Excel

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

**Excel:** `=TAKE(FILTER(A2:C12,B2:B12=F1),F2)` (Excel 2024 and Microsoft 365)

**Google Sheets:** `=ARRAY_CONSTRAIN(FILTER(A2:C12,B2:B12=F1),F2,3)`

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Ticket | Team | Opened |  | Team | Billing |
| T-501 | Billing | 2026-08-03 |  | How many | 3 |
| T-502 | Tech | 2026-08-03 |  |  |  |
| T-503 | Billing | 2026-08-04 |  |  |  |
| T-504 | Billing | 2026-08-05 |  |  |  |
| T-505 | Tech | 2026-08-05 |  |  |  |
| T-506 | Sales | 2026-08-06 |  |  |  |
| T-507 | Billing | 2026-08-07 |  |  |  |
| T-508 | Tech | 2026-08-07 |  |  |  |
| T-509 | Billing | 2026-08-10 |  |  |  |
| T-510 | Sales | 2026-08-11 |  |  |  |
| T-511 | Billing | 2026-08-12 |  |  |  |

Formula in E4: `=TAKE(FILTER(A2:C12,B2:B12=F1),F2)`

Result (spills 3 × 3): T-501, Billing, 8/3/2026; T-503, Billing, 8/4/2026; T-504, Billing, 8/5/2026

## 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.

## Other ways

- `=TAKE(SORT(FILTER(A2:C12,B2:B12=F1),3,-1),F2)`: Sort 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)`: A 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})`.

## 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)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/return-the-first-n-matches
