Filter Unique Values Using the Filter Menu in Google Sheets

Can I filter unique values/rows/records using the Filter Menu in Google Sheets? Is it possible?

Yes! you can filter unique values using the Filter menu in Google Sheets. Utilize a custom formula in the Filter menu’s custom formula field, similar to how you use custom formulas in conditional formatting.

When you filter your data using the Filter menu command interface, it offers several advantages. One of the foremost benefits is filtering your data at the source, allowing direct editing of the filtered data.

Besides the Filter menu, Google Sheets provides functions like FILTER and QUERY for conditional data filtering. However, these functions don’t enable filtering data at its source; they filter data into a new range or sheet.

It’s important to note that these functions lack parameters for making the data unique. You may consider using UNIQUE or SORTN in conjunction with these functions to achieve uniqueness.

In this discussion, our focus is on filtering unique values using the Filter menu. This can be accomplished by utilizing a custom formula in the Filter menu’s custom formula field, which applies to both sorted and unsorted data.

Sample Data (Sorted)

First, I’ll apply my custom formula to a sorted list so you can grasp the concept.

The sample data includes authors’ names in column A and their book titles in column B. As the data is sorted, you can readily identify repeated book titles in column B.

Sample sorted data to filter by unique

Now, let’s explore how to filter unique values—specifically, book titles—using the Filter menu.

How to Filter Unique Values Using the Filter Menu

Before filtering unique values using the Filter menu, decide whether you want to filter the first occurrence or the last.

For instance, let’s consider the book title “The Mysterious Affair at Styles,” which appears in rows 5, 6, and 7. Which row would you like to see, the 5th or the 7th?

If you want to filter the first occurrence, use this formula:

=COUNTIF($B$1:B2, B2)=1

If you want to filter the last occurrence, use this formula:

=COUNTIF(B2:B, B2)=1

Both COUNTIF formulas can effectively filter unique values in the Filter menu. The output will be the same, but there’s a difference when you examine the rows.

Both formulas follow the syntax:

COUNTIF(range, criterion)

In the first formula, the range includes the header row and the row below it ($B$1:B2), while in the second formula, the range encompasses the entire column except for the header (B2:B).

Note: To understand what these formulas return, enter them in cell C2 and drag the fill handle down as far as needed.

Step-by-Step Instructions

  1. Select the data range, here, A1:B16 or A1:B.
  2. Go to the Data menu and click on “Create a filter.”
    Filter Menu
  3. Navigate to cell B1 and click on the filter drop-down, then select “Filter by condition” > “Custom formula is.”
    Filter unique values in filter menu
  4. In the given field, enter one of the above COUNTIF formulas and click OK.
Result after applying unique filter in the filter menu

This will filter the unique rows in column B.

Filtering Unique Values in Unsorted Data Using Filter Menu

Do I need to sort the data before applying the above custom formulas in the Filter menu?

No, you don’t! You can use the same formulas. So needless to say, all the steps are the same.

The formulas will correctly filter the unique records.

Resources

Here are some related resources regarding the filter menu in Google Sheets.

  1. How to Filter by Month Using the Filter Menu in Google Sheets
  2. Filter by Date Range Using Filter Menu in Google Sheets
  3. Filter Menu to Filter Max N Values in Google Sheets – Custom Formula
  4. Using Cell Reference in Filter Menu Filter by Condition in Google Sheets
Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Hierarchical Numbering Sequences in Excel

Creating hierarchical numbering sequences in an Excel spreadsheet can significantly improve the way you...

How to Easily Repeat a Sequence of Numbers in Excel

Excel offers multiple ways to accomplish tasks, and the simplicity of each approach depends...

Create a Sequence of Dates at Every Nth Row in Excel (Dynamic Array)

Would you like to create a sequence of dates in every nth row in...

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

More like this

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

Limit Formula Expansion to a Specific Row in Google Sheets

In this tutorial, I’ll explain how to limit the expansion of an array formula...

3-D Referencing Structured Data Tables in Google Sheets

When you have several tables within a single sheet—not across multiple sheets in a...

4 COMMENTS

  1. I used this formula, and it shows only the last value from my list.

    How can I show the first value from my list?

    Thank you in advance for your feedback.

    • Hi, Sopheak Men,

      Sort your data by the column you want to filter. As per my example, it’s column B.

      Then use the below custom formula rule.

      =countif($B$1:$B2,$B2)=1

      Please note that cell B1 contains the column name (field label). But the range in the formula must be referred to as $B$1:$B2, not as $B$2:$B2.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.