ShareYourGroupShareYourGroupGoogle Sheets

Only in Sheets

FILTER function in Google Sheets

FILTER returns the rows of a range that meet one or more conditions.

FILTER shows the rows of a table that pass a test, in another place, and keeps the list up to date as the data changes. It is the function to reach for when someone asks, "can I see just the rows for this customer?"

Syntax

=FILTER(range, condition1, [condition2], ...)
ArgumentWhat it is
rangeThe range to take rows from.
condition1A test on a column of the same height, such as C2:C13="North".
condition2, ...More tests. A row must pass all of them.

Examples

Sample sheet: Twelve sales made by four salespeople in three regions.
ABCDEF
1DateSalespersonRegionProductUnitsAmount
205-Jan-2026AshaNorthNotebook201200
312-Jan-2026RaviSouthPen50500
420-Jan-2026MeenaNorthBag43000
502-Feb-2026AshaEastPen30300
614-Feb-2026KabirSouthNotebook15900
728-Feb-2026RaviNorthBag21500
803-Mar-2026MeenaEastNotebook402400
915-Mar-2026AshaNorthBag32250
1022-Mar-2026KabirSouthPen60600
1101-Apr-2026RaviEastNotebook251500
1218-Apr-2026MeenaNorthPen80800
1306-May-2026AshaSouthBag53750

How it works

The first argument is the data. Each argument after it is a condition: a comparison on a column that has the same number of rows as the data. FILTER returns the rows for which every condition is true.

The result spills into the cells below and beside the formula. Those cells must be empty.

Conditions

Dates compare like numbers: A2:A13>=DATE(2026,3,1).

When nothing matches

FILTER returns the error #N/A when no row passes. Unlike Excel's version, it has no argument for a message, so wrap it in IFERROR, as the sixth example does.

Filtering columns

FILTER can also pick columns, when the condition is a single row as wide as the data: =FILTER(A1:F13, A1:F1<>"Units") returns every column except Units. A list of ones and zeros in curly brackets does the same by position: =FILTER(A2:F13, {1,0,0,1,0,1}).

With other functions

FILTER or QUERY?

Both pick rows. FILTER is simpler and its conditions are ordinary formulas, so anything a formula can test, FILTER can use. QUERY is better when you also want to choose columns, sort, and work out totals in the same step.

FILTER the function and filter the menu

Data, Create a filter adds buttons to the heading row and hides the rows you untick, in place. The FILTER function leaves the data alone and builds a separate, live list. A filter view lets each person filter without disturbing anyone else. Use the menu to explore, and the function to build a report.

Common mistakes

In Excel

Excel 2021 and Microsoft 365 have a FILTER with a different shape: =FILTER(array, include, [if_empty]). It takes one condition argument, so several conditions are multiplied together, (test1)*(test2), and it has a third argument for the "nothing found" message. Formulas need rewriting when a file moves between the two.

Related functions

The results on this page were worked out by us from the sample sheet; they were not produced by a script running Google Sheets. If Sheets shows you something different, please tell us.

This is an independent help site. It is not connected with or approved by Google. Google Sheets is a trademark of Google LLC, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.