# Remove Duplicates, Show and Count Unique Values

Row Zero makes it easy to find, highlight, and/or remove duplicates in a spreadsheet. You can similarly find, highlight, and count unique values with ease. Here's how:

- [Remove duplicates](#how-to-remove-duplicates-in-your-spreadsheet)
- [Conditional format duplicates](#conditional-format-duplicates)
- [Conditional format uniques](#conditional-format-uniques)
- [Show and count unique values](#show-and-count-unique-values)

### How to remove duplicates in your spreadsheet:

Row Zero makes it easy to [remove duplicate values](/blog/remove-duplicates-and-count-unique-values) in a spreadsheet with a built-in feature that works like remove duplicates in Excel and Google Sheets. Here are steps to remove duplicates:

1. Select the range of cells you would like to remove duplicates from. If you don't select a range of cells, the feature will select the entire sheet by default, which is generally recommended.
2. There are two ways to access the feature:
    - In the header menu, go to **Data**, **Remove duplicates**
    - Click the remove duplicates icon in the formatting menu in the header. **Note**: Depending on your screen size and zoom level, you may need to click the 3 dots to expand the menu to access remove duplicates.  

      ![remove duplicates in spreadsheet](https://cdn.sanity.io/images/2w8agf2t/production/616f4cd9bbe7d7a7a62bc15a3c2af60f3198f1dd-1587x180.png)

3. Select the column(s) that you want to remove duplicates from. If you select multiple columns, it will only remove duplicate rows that have duplicate values in each of the columns selected. Note that all columns are selected by default, but in many instances you may want to select just one or two columns.  

   ![remove duplicates in spreadsheet](https://cdn.sanity.io/images/2w8agf2t/production/584927dd6d2c5ef53d3acd76a8e0d8c6d22626e3-1905x842.png)

4. Click **Apply** and all matching duplicate rows will be deleted from the sheet

## Conditional format duplicates

It can sometimes be helpful to show duplicate values in your spreadsheet but not remove them. You can used Row Zero's [conditional formatting](/docs/formatting) feature to set the **Condition** to **Duplicate**. This will find duplicate values in the range and apply your desired formatting to highlight duplicates in your sheet. Here's how to set duplicate conditional formatting:  

![duplicate conditional formatting in spreadsheet](https://cdn.sanity.io/images/2w8agf2t/production/93259b0e6c3e14fbc1b0e8bcfc702dcfd12cf0a2-1387x702.png)

## Conditional format uniques

Similar to duplicate conditional formatting, you can also use conditional formatting to highlight unique values that only appear once in a range by setting the **Condition** to **Unique**. Here's how to conditional format unique values:  

![conditional formatting unique values in spreadsheet](https://cdn.sanity.io/images/2w8agf2t/production/961df1c95da2baa3161efa995f5f96a70bd086e0-1379x700.png)

## Show and count unique values

There are a few options for showing and counting unique values in the spreadsheet:

- The **HISTOGRAM** function creates a data table with a row for each unique value and a count of how many times the value appears in the range. Think of it as a quick pivot table count unique.

  ![use the HISTOGRAM function to data table with the frequency of each unique value ](https://cdn.sanity.io/images/2w8agf2t/production/f095bb04b3af985f2078c4a524db8b7bd6790c6b-796x806.png)

- Similarly, creating a [pivot table](/docs/pivot-tables) is an easy way to drill down to unique values in a spreadsheet. Select your data range and go to **Insert**, **Pivot table** and move the field you want to see unique values for to **Rows** and then summarize data by these values by moving fields to **Values**. The simplest way to count uniques is to pull the same field to **Values** as **Rows** and select **Count** as the calculation to apply.  

  ![count unique values with a pivot table](https://cdn.sanity.io/images/2w8agf2t/production/3b3ed5c7cab7987c531302a299950133f3b7d54d-1904x762.png)

- **Pivot Table count uniques values** - Row Zero pivot tables have a built-in **Count Unique** calculation option that counts the number of unique values in a given column or field. This can be very useful for things like counting the number of unique Customer IDs that have performed a particular action or counting distinct email addresses that have logged into a website over a time period. Read more about the [pivot table count unique](/blog/count-unique-pivot-table) values option here.  

![pivot table count unique values](https://cdn.sanity.io/images/2w8agf2t/production/559b72239ab34eb7d504bd392cceff5bbb243cb4-1774x720.png)

[Video: YouTube](https://www.youtube.com/watch?v=POEH3SKHxjI)
