{"id":3025,"date":"2018-09-22T18:12:54","date_gmt":"2018-09-22T18:12:54","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=3025"},"modified":"2024-02-19T14:52:48","modified_gmt":"2024-02-19T14:52:48","slug":"excel-list-unique-values","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/","title":{"rendered":"Excel List of Unique Values"},"content":{"rendered":"\n

The are many methods you can use to remove duplicates and keep only unique values. In this lesson I\u2019ll show you 4 ways, so you can choose the one which is the best for your needs.<\/p>\n\n\n\n

Remove duplicates button<\/h2>\n\n\n\n

Look at the following example. I have a list of random numbers<\/a>, which I generated using the RANDBETWEEN<\/strong> function.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Select ranges and go to Data >> Data Tools >> <\/strong>Remove Duplicates<\/a>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

When a new window appears, click OK<\/strong>.<\/p>\n\n\n\n

You will get information about the number of cells removed, and the number of unique values.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

This is the result.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Filter out duplicates<\/h2>\n\n\n\n

Let\u2019s say that you don\u2019t want to remove values, just hide those values that are duplicates<\/a>. To do this, we will have to filter them out. In order to do so, first select all the values in the example. Now, when you have the cells selected, go to Data >> Sort & Filter >> Advanced<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Here, you have a few options. Let\u2019s select the first radio button to filter the list, and check Unique records only<\/strong>. Click OK.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Now, you have the same unique values, but this time they are filtered out, instead of removed. If you select these cells and press Ctrl + C, only unique values will be copied.<\/p>\n\n\n\n

In order to show all values, even those that are hidden, you can\u2019t right-click and choose Unhide<\/strong> from the contextual menu because it won\u2019t work here, instead, use the cleat button located at Data >> Sort & Filter >> Clear<\/strong>.<\/p>\n\n\n\n

Remove values with an Excel formula<\/h2>\n\n\n\n

In this example, we will use a COUNTIF<\/strong> function. It counts the number of cells inside a range that meet the given criteria.<\/p>\n\n\n\n

=COUNTIF($A$1:A1,$A$1:$A$20)<\/pre>\n\n\n\n

We will use here an expanding reference. When the formula is copied<\/a> down, the reference will expand to include more rows in the unique list. So the first occurrence in the list will return – 1, second \u2013 2, third \u2013 3, and so on. This means, that values that returned 1 are unique values.<\/p>\n\n\n\n

Remove values with VBA<\/h2>\n\n\n\n

If you want to know how the VBA code looks for removing duplicates, you can record a macro<\/a>. But if you don\u2019t want to do this, here is the function.<\/p>\n\n\n\n

Sub RemoveDuplicates()\n    ActiveSheet.Range(\"$A$1:$A$20\").RemoveDuplicates Columns:=1, Header:=xlNo\nEnd Sub<\/pre>\n\n\n\n

Header:=xlNo<\/strong> means that we don\u2019t have a header in our example.<\/p>\n","protected":false},"excerpt":{"rendered":"

The are many methods you can use to remove duplicates and keep only unique values. In this lesson I\u2019ll show you 4 ways,…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"yoast_head":"\nExcel List of Unique Values<\/title>\n<meta name=\"description\" content=\"Learn 4 ways to remove duplicates in Excel, including filtering out duplicates & using the remove duplicates button. Keep only unique values easily!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excel List of Unique Values\" \/>\n<meta property=\"og:description\" content=\"Learn 4 ways to remove duplicates in Excel, including filtering out duplicates & using the remove duplicates button. Keep only unique values easily!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-22T18:12:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-19T14:52:48+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png\" \/>\n<meta name=\"author\" content=\"Tomasz Decker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomasz Decker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/\"},\"author\":{\"name\":\"Tomasz Decker\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"headline\":\"Excel List of Unique Values\",\"datePublished\":\"2018-09-22T18:12:54+00:00\",\"dateModified\":\"2024-02-19T14:52:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/\"},\"wordCount\":388,\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png\",\"articleSection\":[\"formulas\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/\",\"url\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/\",\"name\":\"Excel List of Unique Values\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png\",\"datePublished\":\"2018-09-22T18:12:54+00:00\",\"dateModified\":\"2024-02-19T14:52:48+00:00\",\"description\":\"Learn 4 ways to remove duplicates in Excel, including filtering out duplicates & using the remove duplicates button. Keep only unique values easily!\",\"breadcrumb\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#primaryimage\",\"url\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png\",\"contentUrl\":\"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/officetuts.net\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Excel List of Unique Values\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/officetuts.net\/excel\/#website\",\"url\":\"https:\/\/officetuts.net\/excel\/\",\"name\":\"\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/officetuts.net\/excel\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\",\"name\":\"Tomasz Decker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"caption\":\"Tomasz Decker\"},\"logo\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\"},\"description\":\"Spreadsheet and Python enthusiast.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Excel List of Unique Values","description":"Learn 4 ways to remove duplicates in Excel, including filtering out duplicates & using the remove duplicates button. Keep only unique values easily!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/","og_locale":"en_US","og_type":"article","og_title":"Excel List of Unique Values","og_description":"Learn 4 ways to remove duplicates in Excel, including filtering out duplicates & using the remove duplicates button. Keep only unique values easily!","og_url":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/","article_published_time":"2018-09-22T18:12:54+00:00","article_modified_time":"2024-02-19T14:52:48+00:00","og_image":[{"url":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png"}],"author":"Tomasz Decker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tomasz Decker","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#article","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/"},"author":{"name":"Tomasz Decker","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"headline":"Excel List of Unique Values","datePublished":"2018-09-22T18:12:54+00:00","dateModified":"2024-02-19T14:52:48+00:00","mainEntityOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/"},"wordCount":388,"publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#primaryimage"},"thumbnailUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png","articleSection":["formulas"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/","url":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/","name":"Excel List of Unique Values","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/#website"},"primaryImageOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#primaryimage"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#primaryimage"},"thumbnailUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png","datePublished":"2018-09-22T18:12:54+00:00","dateModified":"2024-02-19T14:52:48+00:00","description":"Learn 4 ways to remove duplicates in Excel, including filtering out duplicates & using the remove duplicates button. Keep only unique values easily!","breadcrumb":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#primaryimage","url":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png","contentUrl":"http:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2018\/09\/example-list-unique-values.png"},{"@type":"BreadcrumbList","@id":"https:\/\/officetuts.net\/excel\/formulas\/excel-list-unique-values\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/officetuts.net\/excel\/"},{"@type":"ListItem","position":2,"name":"Excel List of Unique Values"}]},{"@type":"WebSite","@id":"https:\/\/officetuts.net\/excel\/#website","url":"https:\/\/officetuts.net\/excel\/","name":"","description":"","publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/officetuts.net\/excel\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42","name":"Tomasz Decker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","caption":"Tomasz Decker"},"logo":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/"},"description":"Spreadsheet and Python enthusiast."}]}},"_links":{"self":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/3025"}],"collection":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/comments?post=3025"}],"version-history":[{"count":8,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/3025\/revisions"}],"predecessor-version":[{"id":13593,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/3025\/revisions\/13593"}],"wp:attachment":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/media?parent=3025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/categories?post=3025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/tags?post=3025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}