Home » Google Sheets: How to Filter Using Custom Formula

Google Sheets: How to Filter Using Custom Formula

by Erma Khan

Often you may want to filter data using a custom formula in Google Sheets.

Fortunately this is easy to do using the Filter by condition function.

The following example shows how to use this function in practice.

Example: How to Filter Using Custom Formula in Google Sheets

Suppose we have the following dataset that contains information about various basketball players:

Now suppose we’d like to filter the rows for where the Player column contains “Good” or “Great” in the name.

To do so, we can highlight the cell range A1:B12 and then click the Data tab along the top ribbon and then click Create a filter:

Next, click the filter icon next to Player and then click Filter by condition, then scroll all the way to the bottom of the list and click Custom formula is:

Google Sheets filter using custom formula

Type the following formula into the custom formula box:

=OR(REGEXMATCH(A:A,"Good"),REGEXMATCH(A:A,"Great"))

Once you click OK, the data will automatically be filtered to only show the rows where the Player column contains “Good” or “Great” in the name:

This is just one example of using a custom formula to filter rows in Google Sheets.

There are countless formulas that you could type into the custom formula box depending on how you’d like to filter your own dataset.

Additional Resources

The following tutorials explain how to perform other common operations in Google Sheets:

How to Sum Filtered Rows in Google Sheets
How to Filter Multiple Columns in Google Sheets
How to Use SUMIF with Multiple Columns in Google Sheets

Related Posts