Parameter List
Syntax
FILTER(data, condition,
[if_empty]
, [mode]
)data
The range or data that you want to filter by some criteria. For example: A1:B4
or '[["name","age"],["John",30],["Ann",28]]
'.
condition
Expression that contains a range/ JSON with the same size as data
. Examples: A1:A5>5
, A1:A5=B1:B5 or A1:A2='
"London","Paris"'. You can combine conditions with "*" (AND) and "+" (OR). Example:
(A1:A5>5)*(A1:A5<10)`.
[optional] if_empty
The output of the function when there is no results found.
[optional] mode
By default (0
) FILTER
keeps the first row/ column (header). Use 1
to keep it only if it matches conditions. 2
always removes it.