How to return the entire row of a match
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Look up a key and pull back the whole record — every column for that customer, order, or SKU — not just one field.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =FILTER(A2:C100,A2:A100="Amy") | FILTER returns every column of the matching row(s) as a spilled range. Excel 365 / LibreOffice 24.8+. For old Excel, use INDEX per column (below). |
| Google Sheets | =FILTER(A2:C100,A2:A100="Amy") | Identical. Also =VLOOKUP("Amy",A2:C100,{1,2,3},FALSE) spills all columns. |
| LibreOffice Calc | =FILTER(A2:C100,A2:A100="Amy") | Identical (24.8+). Legacy: =INDEX(A2:A100,MATCH(...)) repeated per column with an absolute key. |
How it works
VLOOKUP returns a single column; to pull a whole record you want FILTER, which keeps every column of the rows whose condition is TRUE. Here filtering the three-column table on name = "Amy" spills back her entire row — Amy, 90, Blue — into adjacent cells. Because it's a dynamic array the result grows or shrinks with the data, and if the key matches several rows you get all of them stacked, which is exactly what you want for one-to-many lookups. On versions without FILTER you have three fallbacks: VLOOKUP/XLOOKUP with an array of column numbers ({1,2,3}) to spill columns, INDEX(range, MATCH(...)) written once per column with the key locked absolute, or XLOOKUP returning a whole row by pointing its return argument at the full table. Add more conditions by multiplying them inside FILTER: FILTER(A2:C100,(A2:A100="Amy")*(B2:B100>50)).
Verified, not just documented
We ran =FILTER(A2:C4,A2:A4="Amy") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned Amy, 90, Blue — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned Amy, 90, Blue for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
FILTER — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to average a range that contains errors
- How to count unique values that match a condition
- How to FILTER by multiple criteria (AND / OR)
- How to find values that appear in both of two lists
- How to use the FILTER function