How do I use FILTER in Excel?
Use FILTER when you want to return only the rows that match a condition. Enter Target range, Include condition, If empty in that order, then add optional arguments when needed.
Filters rows using include condition.
FILTER(array, include, [if_empty])array
RequiredSpecify a reference range. You can drag or click start/end cells.
include
RequiredEnter an expression such as comparison or calculation.
if_empty
OptionalEnter a text value (wrap with quotes when needed).
Use FILTER to extract only rows from columns A to D where Category in column B is Food, and return "Not found" when none match. You can set ranges by dragging from the start cell to the end cell in the same argument field.
| # | AProduct ID | BCategory | CProduct Name | DSales |
|---|---|---|---|---|
| 2 | P001 | Food | Apple | 1200 |
| 3 | P002 | Food | Banana | 980 |
| 4 | P003 | Stationery | Notebook | 450 |
| 5 | P004 | Stationery | Pen | 300 |
| 6 | P005 | Food | Grapes | 1500 |
| 7 | P006 | Stationery | Ruler | 250 |
| 8 |
How to Use (Formula)
=FILTER(A2:D8, B2:B8="Food", "Not found")Result
P001, Food, Apple, 1200 | P002, Food, Banana, 980 | P005, Food, Grapes, 1500
Use FILTER when you want to return only the rows that match a condition. Enter Target range, Include condition, If empty in that order, then add optional arguments when needed.
Use the "Start Function Practice" button to jump straight into FILTER drills.
The main arguments are Target range, Include condition, If empty. Start with the required ones, then add optional arguments if needed.