Excel Function

FILTER

Filters rows using include condition.

FILTER(array, include, [if_empty])

Arguments

array

Required

Specify a reference range. You can drag or click start/end cells.

include

Required

Enter an expression such as comparison or calculation.

if_empty

Optional

Enter a text value (wrap with quotes when needed).

Practice Preview

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.

Example Table

#
AProduct ID
BCategory
CProduct Name
DSales
2P001FoodApple1200
3P002FoodBanana980
4P003StationeryNotebook450
5P004StationeryPen300
6P005FoodGrapes1500
7P006StationeryRuler250
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

Practice This Function

FILTER FAQ

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.

Where can I practice FILTER?

Use the "Start Function Practice" button to jump straight into FILTER drills.

What arguments does FILTER use?

The main arguments are Target range, Include condition, If empty. Start with the required ones, then add optional arguments if needed.