Filter for unique values or remove duplicate values (2024)

Filter for unique values or remove duplicate values (1)

WindowsWeb

In Excel, there areseveral ways to filter for unique values—or remove duplicate values:

  • To filter for unique values, click Data > Sort & Filter > Advanced.

    Filter for unique values or remove duplicate values (2)

  • To remove duplicate values, click Data > Data Tools > Remove Duplicates.

    Filter for unique values or remove duplicate values (3)

  • To highlight unique or duplicate values, use the Conditional Formatting command in the Style group on the Home tab.

Filtering for unique values and removing duplicate values are two similar tasks, since the objective is to present a list of unique values. There is a critical difference, however: When you filter for unique values, the duplicate values are only hidden temporarily. However, removing duplicate values means thatyou are permanently deleting duplicate values.

A duplicate value is one in which all values in at least one row are identicalto all of the values in another row. A comparison of duplicate valuesdepends on the what appears in the cell—not the underlying value stored in the cell. For example, if you have the same date value in different cells, one formatted as "3/8/2006" and the other as "Mar 8, 2006", the values are unique.

Check before removing duplicates: Before removing duplicate values, it's a good idea to first try to filter on—or conditionally format on—unique values to confirm that you achieve the results you expect.

Follow these steps:

  1. Select the range of cells, or ensure that the active cell is in a table.

  2. Click Data > Advanced (in the Sort & Filter group).

    Important:Insert alert text here.

    Filter for unique values or remove duplicate values (4)

  3. In the Advanced Filter popup box, do one of the following:

To filter the range of cells or table in place:

  • Click Filter the list, in-place.

To copy the results of the filter to another location:

  • Click Copy to another location.

  • In the Copy to box, enter a cell reference.

  • Alternatively, click Collapse Dialog Filter for unique values or remove duplicate values (5)to temporarily hide the popup window, select a cell on the worksheet, and then clickExpand Filter for unique values or remove duplicate values (6).

  • Check the Unique records only, thenclick OK.

The unique values from therange will copy to the new location.

When you remove duplicate values, the only effect is on the values in the range of cells or table. Other values outside the range of cells or table will not change or move. When duplicates are removed, the first occurrence of the value in the listis kept,but other identical values are deleted.

Because you are permanently deleting data, it's a good idea to copy the original range of cells or table to another worksheet or workbook before removing duplicate values.

Follow these steps:

  1. Select the range of cells or ensure that the active cell is in a table.

  2. On the Data tab, click Remove Duplicates (in the Data Tools group).

    Filter for unique values or remove duplicate values (7)
  3. Do one or more of the following:

    • Under Columns, select one or more columns.

    • To quickly select all columns, click Select All.

    • To quickly clear all columns, click Unselect All.

      If the range of cells or table contains many columns and you want to only select a few columns, you may find it easier to click Unselect All, and then under Columns, select those columns.

      Note:Data will be removed from all columns, even if you don't select all the columns at this step. For example, if youselect Column1 and Column2, but not Column3, thenthe “key” used to find duplicates is the value of BOTH Column1 & Column2.If a duplicate is found in those columns, then the entire row will be removed, including other columns in the table or range.

  4. Click OK, and a message will appear toindicate how many duplicate values were removed, or how many unique values remain. Click OK to dismiss this message.

  5. Undo the change by click Undo (or pressing Ctrl+Z on the keyboard).

You cannot remove duplicate values from outline data that is outlined or that has subtotals. To remove duplicates, you must remove both the outline and the subtotals. For more information, see Outline a list of data in a worksheet and Remove subtotals.

Note:You cannot conditionally format fields in the Values area of a PivotTable report by unique or duplicate values.

Tip:When using the "Duplicate Values" formatting rule, if the "Office authoring languages and proofing" setting is set to a language that uses Double-byte character set (DBCS) encoding, such as Japanese, halfwidth and fullwidth characters are treated the same. If you need to differentiate between them, you can use the "Use a formula to determine where this formula is true" rule type with a COUNTIF formula. For example, to identify duplicate values in the range A2:A400, apply the formula "=COUNTIF($A$2:$A$400,A2)> 1" for conditional formatting.

Quick formatting

Follow these steps:

  1. Select one or more cells in a range, table, or PivotTable report.

  2. On the Home tab, in the Style group, click the small arrow for Conditional Formatting, and then click Highlight Cells Rules, and select Duplicate Values.

    Important:Insert alert text here.

    Filter for unique values or remove duplicate values (8)

  3. Enter the values that you want to use, and then choose a format.

Advanced formatting

Follow these steps:

  1. Select one or more cells in a range, table, or PivotTable report.

  2. On the Home tab, in the Styles group, click the arrow for Conditional Formatting, and then click Manage Rules to display the Conditional Formatting Rules Manager popup window.

    Important:Insert alert text here.

    Filter for unique values or remove duplicate values (9)

  3. Do one of the following:

    • To add a conditional format, click New Rule to display the New Formatting Rule popup window.

    • To change a conditional format, begin by ensuring that the appropriate worksheet or table has been chosen in the Show formatting rules for list. If necessary, choose another range of cells by clicking Collapse Filter for unique values or remove duplicate values (10)button in the Applies to popup window temporarily hide it. Choose anew range of cells on the worksheet, then expand the popup window again Filter for unique values or remove duplicate values (11). Select the rule, and then click Edit rule to display the Edit Formatting Rule popup window.

  4. Under Select a Rule Type, click Format only unique or duplicate values.

  5. In the Format all list ofEdit the Rule Description, choose either unique or duplicate.

  6. Click Format to display the Format Cells popup window.

  7. Select the number, font, border, or fill format that you want to apply when the cell value satisfies the condition, and then click OK. You can choose more than one format. The formats that you select are displayed in the Preview panel.

In Excel for the web, you can remove duplicate values.

Remove duplicate values

When you remove duplicate values, the only effect is on the values in the range of cells or table. Other values outside the range of cells or table will not change or move. When duplicates are removed, the first occurrence of the value in the list is kept, but other identical values are deleted.

Important:You can always click Undo to get back your data after you have removed the duplicates. That being said, it's a good idea to copy the original range of cells or table to another worksheet or workbook before removing duplicate values.

Follow these steps:

  1. Select the range of cells, or ensure that the active cell is in a table.

  2. On the Data tab, click Remove Duplicates .

  3. In the Remove Duplicates dialog box, unselect any columns where you don't want to remove duplicate values.

    Note:Data will be removed from all columns, even if you don't select all the columns at this step. For example, if you select Column1 and Column2, but not Column3, thenthe “key” used to find duplicates is the value of BOTH Column1 & Column2.If a duplicate is found in Column1 and Column2, then the entire row will be removed, including data from Column3.

  4. Click OK, and a message will appear to indicate how many duplicate values were removed. Click OK to dismiss this message.

Note:If you want to get back your data, simply click Undo (or press Ctrl+Z on the keyboard).

Need more help?

You can always ask an expert in the Excel Tech Communityor get support inCommunities.

See Also

Count unique values among duplicates

Filter for unique values or remove duplicate values (2024)

FAQs

How do you filter for unique values or remove duplicate values in Excel? ›

To filter for unique values, click Data > Sort & Filter > Advanced. To remove duplicate values, click Data > Data Tools > Remove Duplicates.

How to find unique values in Excel without removing duplicates? ›

Count the number of unique values by using a filter
  1. Select the range of cells, or make sure the active cell is in a table. ...
  2. On the Data tab, in the Sort & Filter group, select Advanced. ...
  3. Select Copy to another location.
  4. In the Copy to box, enter a cell reference. ...
  5. Select the Unique records only check box, and select OK.

Does filter remove duplicates? ›

There can be n reasons for duplicates in content, but you cannot avoid this. To remove this, you can use several functions such as filter(), set(), reduce(), forEach(), and indexof() methods. Using these functions, you can remove duplicates from JavaScript arrays.

How do you filter unique data? ›

How to filter for unique values in Excel
  1. Select the range of cells or table that you want to filter for unique values.
  2. Click on "Data."
  3. Navigate to "Sort & Filter."
  4. Select "Advanced."
  5. Press "Filter the list, in-place."
  6. Check the box for "Unique records only."
  7. Click "OK."
Aug 15, 2024

How do I remove one duplicate and keep the unique one in Excel? ›

How to delete duplicates in Excel but keep one?
  1. Select a cell in your dataset and go to Data > Advanced filter to the far right. ...
  2. Choose to “Filter the list, in-place” or “Copy to another location”. ...
  3. Tick the “Unique records only” box to keep the unique values, and then “o*k” to remove all duplicates.
Mar 13, 2024

How to filter for only duplicates in Excel? ›

On the Home tab, in the Styles group, click Conditional Formatting, and then click New Rule. In the Style list, choose Classic, and then in the Format only top or bottom ranked values list, choose Format only unique or duplicate values. In the values in the selected range list, choose either unique or duplicate.

What is the formula to exclude duplicates in Excel? ›

Simply use the formula =UNIQUE, then select the list you want to remove duplicates from as your range.

What can you use in advanced filtering to remove duplicate records? ›

On the Data menu, point to Filter, and then click Advanced Filter. In the Advanced Filter dialog box, click Filter the list, in place. Select the Unique records only check box, and then click OK. The filtered list is displayed and the duplicate rows are hidden.

Should you always remove duplicates? ›

Duplicates in data give overly optimistic test performance that results to overfitting. So it is important to remove them but while removing them always look for other features related to them as removing duplicates could lead to a loss of valuable insights.

How to remove duplicate values in Excel? ›

Find and Remove Duplicates
  1. Select the range of cells containing duplicate values that should be removed. ...
  2. By selecting Data > Remove Duplicates and then checking or unchecking the columns you wish to purge, you can remove duplicate records.
  3. Then click OK.
Aug 28, 2024

How to identify duplicates in Excel without deleting? ›

Click "Home" from the top menu ribbon. Click "Conditional Formatting," then "Highlight Cells Rules," and click on "Duplicate Values..." to open a pop up window. Couldn't load content. Choose how you would like the duplicated data to be displayed, then click "OK" to close the window.

What is the formula for unique values in Excel? ›

=Unique is a function used in Excel to find only Unique values in a range or array.

What can I use instead of a unique function in Excel? ›

4 Ways to Extract Unique Values in Excel
  • Advanced Filter.
  • Remove Duplicates Option.
  • INDEX-MATCH (Array Formula)
  • MACRO (Advanced Filter)

How do you filter to only show duplicates in Excel? ›

On the Home tab, in the Styles group, click Conditional Formatting, and then click New Rule. In the Style list, choose Classic, and then in the Format only top or bottom ranked values list, choose Format only unique or duplicate values. In the values in the selected range list, choose either unique or duplicate.

How do I remove non duplicate values in Excel? ›

How to remove non-duplicates in Excel
  1. Create a helper column with a formula like "=COUNTIF(A:A, A2)=1".
  2. Filter for TRUE in the helper column.
  3. Delete non-duplicate rows.

Is there a way to identify duplicates in Excel without deleting? ›

You may use helper column to filter duplicates/unique values. If you are on Excel 365 you may use =COUNTIFS(range, range), if not =COUNTIFS(range, cell) and Ctrl+D it down. Values >1 in this column indicate duplicates, use filter on all but 1.

How to keep only duplicate values in Excel? ›

Keep duplicate rows

Select a column by clicking the column header. To select more than one column contiguously or discontiguously, press Shift+Click or CTRL+Click on each subsequent column. Select Home > Keep Rows > Keep Duplicates.

Top Articles
Dolonia – The Dictionary of Obscure Sorrows
Ally Financial (ALLY) Stock Forecast, Price Targets and Analysts Predictions - TipRanks.com
Omega Pizza-Roast Beef -Seafood Middleton Menu
Walgreens Harry Edgemoor
Mcgeorge Academic Calendar
Voorraad - Foodtrailers
Byrn Funeral Home Mayfield Kentucky Obituaries
How to know if a financial advisor is good?
Chalupp's Pizza Taos Menu
Craigslist Mexico Cancun
Atrium Shift Select
Magic Mike's Last Dance Showtimes Near Marcus Cedar Creek Cinema
Thotsbook Com
Diablo 3 Metascore
Pittsburgh Ultra Advanced Stain And Sealant Color Chart
Busty Bruce Lee
Learn2Serve Tabc Answers
Byte Delta Dental
Steamy Afternoon With Handsome Fernando
Craigslist Appomattox Va
Graphic Look Inside Jeffrey Dahmer
SuperPay.Me Review 2023 | Legitimate and user-friendly
How Taraswrld Leaks Exposed the Dark Side of TikTok Fame
Apartments / Housing For Rent near Lake Placid, FL - craigslist
Bn9 Weather Radar
2000 Ford F-150 for sale - Scottsdale, AZ - craigslist
fft - Fast Fourier transform
Expression Home XP-452 | Grand public | Imprimantes jet d'encre | Imprimantes | Produits | Epson France
The Procurement Acronyms And Abbreviations That You Need To Know Short Forms Used In Procurement
Helpers Needed At Once Bug Fables
Trust/Family Bank Contingency Plan
Vip Lounge Odu
Pnc Bank Routing Number Cincinnati
1987 Monte Carlo Ss For Sale Craigslist
Beth Moore 2023
Greencastle Railcam
Diana Lolalytics
Rocketpult Infinite Fuel
Pitchfork's Top 200 of the 2010s: 50-1 (clips)
Wal-Mart 2516 Directory
Rs3 Bis Perks
2700 Yen To Usd
All-New Webkinz FAQ | WKN: Webkinz Newz
Ups Authorized Shipping Provider Price Photos
Spurs Basketball Reference
Youravon Com Mi Cuenta
Sea Guini Dress Code
Identogo Manahawkin
Vrca File Converter
Turning Obsidian into My Perfect Writing App – The Sweet Setup
OSF OnCall Urgent Care treats minor illnesses and injuries
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 5773

Rating: 4 / 5 (41 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.