+ Reply to Thread
Results 1 to 4 of 4

List without repetitions

Hybrid View

  1. #1
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    List without repetitions

    I know there's like a million posts on here with this, I can't seem to find any, I'll keep looking in the meantime though.

    Looking to list duplicates in a column without spaces.

    I apologize because I'm sure this is a bazillionate post, I'll keep looking in the meantime.

    mew...
    Attached Files Attached Files
    Last edited by mewingkitty; 12-15-2008 at 03:06 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    List unique items from a list

    For a list entered into D2:D20, with D1 as the column heading

    These ARRAY FORMULAS must be committed with CTRL+SHIFT+ENTER,
    instead of just ENTER:
    
    For the first item...
    D2: =INDEX(D2:D20,MATCH(0,-ISBLANK(D2:D20),0))
    
    For all other list items...
    D3: =IF(COUNT(MATCH(D$2:D$20,E$2:E2,0))<COUNT(1/(D$2:D$20<>"")),
    INDEX(D$2:D$20,MATCH(0,(D$2:D$20<>"")-ISNA(MATCH(D$2:D$20,E$2:E2,0)),0)),"")
    Copy D3 into D4 and down through as many cells as you need to cover all possible unique items

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    One minute

    Checking it now.
    I know how to filter out duplicate results, I wanted to get my hands on a code that will accomplish that without having to delete the duplicate cells. I'll see how this works.

    Thanks.

    mew.

    Edit:
    Lists all individual values correctly, without duplicates. I already know how to isolate duplicates, so I should be able to combine the two and come out with a unique list of my duplicate list, thanks again.

    and

    mew.

    again.

    Edit:
    Uploaded example worksheet for others reference. Note that all formulas in column AN are arrays, and that AN2 differs from the rest of AN, as given by Ron Coderre's example.
    Attached Files Attached Files
    Last edited by mewingkitty; 12-15-2008 at 03:15 PM. Reason: Cord.

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, Try this:-
    Results in column "A"
    Dim Rng, Dup As Integer, Dup2 As Integer, c As Integer
    Dim found As Boolean
    
    Rng = Range(Range("d2"), Range("d" & Rows.Count).End(xlUp))
    For Dup = 1 To UBound(Rng)
    found = False
        For Dup2 = Dup + 1 To UBound(Rng)
            If Rng(Dup, 1) <> "" And Rng(Dup, 1) = Rng(Dup2, 1) Then
                If found = False Then
                    c = c + 1
                    Cells(c, "A") = Rng(Dup, 1)
                    found = True
                End If
                    Rng(Dup2, 1) = ""
            End If
        Next Dup2
    Next Dup
    Regards Mick

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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