FILTER
Returns the rows or columns of a range that meet a condition.
- Excel: Verified match
- Google Sheets: Verified match
- Returns: Array
Examples
=FILTER(A1:B5, B1:B5>3, "none") | A | B | |
|---|---|---|
| 1 | 10 | 2 |
| 2 | 20 | 4 |
| 3 | 30 | 6 |
| 4 | 40 | 8 |
| 5 | 50 | 10 |
Result 20
Syntax
FILTER(array, include, [if_empty]) array- range required
include- range required
if_empty- any optional
Errors
#CALC!=FILTER(A1:B2,{FALSE,FALSE})#ERROR!=FILTER(A2:A3)
Related
ARRAY_CONSTRAINTruncates a range to at most the given rows and columns. ARRAYFORMULAEvaluates an expression across a range (this engine already spills, so it is a pass-through for sheets compatibility). ARRAYTOTEXTConverts array to text representation. BYCOLApplies lambda to each column of array. BYROWApplies lambda to each row of array. CHOOSECOLSReturns the specified columns from an array.