Google Sheets Function: FILTER
The FILTER function returns a filtered version of a range, with only the rows or columns that meet the specified conditions.
Usage:
=FILTER(range, condition)
or
=FILTER(range, condition1, condition2, ...)
Example of use
The FILTER function will return in the right-side table all the rows of unpaid purchases (in other words, rows where the payment date is empty):
Enter in the FILTER function:
- range: the data range to return
- condition: the condition to be met (here, the cells in column D must be empty)
The formula here is:
=FILTER(A2:C15,D2:D15="")
Adding more conditions
The FILTER function allows specifying multiple conditions by adding them in sequence.
For example, to filter unpaid purchases and those where the purchase date is more than 30 days old, add an additional condition:
=FILTER(A2:C15,D2:D15="",TODAY()-A2:A15>30)
If needed, you can copy the Google Sheets document (or view the document) with these examples.