Results 1 to 10 of 10

Find and List duplicate values

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Davenport, Iowa
    MS-Off Ver
    Excel 365
    Posts
    206

    Find and List duplicate values

    Hi,

    I have a script where I input a list of values in column A of sheet1, then after I run the macro I want to have a unique list of the duplicate values on sheet2 in column A, however, the only thing listed is the header can someone tell me where I am going wrong?

    
    Sub DuplicateFinder()
    
    Dim data(), unique As Variant, r As Long, lr As Long
    
    lr = Sheet1.UsedRange.Rows(Sheet1.UsedRange.Rows.Count).Row
      
    data = Sheet1.Range("A2:A" & lr).Value
    
    Set unique = CreateObject("Scripting.Dictionary")
    For r = 1 To UBound(data)
        unique(data(r, 1)) = Empty
    Next r
    Sheet2.Range("A1") = unique.Keys
    End Sub
    Last edited by sriley5; 06-09-2018 at 06:09 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-04-2017, 07:29 PM
  2. [SOLVED] Find count of Unique or Duplicate Values based on Concatenated values in 2 columns
    By bdicarlo1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2014, 12:42 AM
  3. Find duplicate values from a list
    By stama100 in forum Excel General
    Replies: 25
    Last Post: 04-14-2014, 11:25 AM
  4. Replies: 3
    Last Post: 08-07-2013, 12:32 AM
  5. Replies: 2
    Last Post: 02-20-2012, 06:06 PM
  6. [SOLVED] Find duplicate in a list
    By Thyagaraj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2006, 03:20 AM
  7. Find a duplicate value within a list?
    By Arla M in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-26-2005, 07:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1