+ Reply to Thread
Results 1 to 5 of 5

Removing duplicates from multiple columns (treating each column separately)

  1. #1
    Registered User
    Join Date
    01-02-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    63

    Removing duplicates from multiple columns (treating each column separately)

    hi all

    Hopefully the description is self explanatory

    http://i.imgur.com/MkPEs1l.png

    I know how to remove duplicates from a columns but i have 200+ columns and will need to perform this on all.

    I couldnt find anything on the net. I found this http://www.mrexcel.com/forum/excel-q...e-columns.html but the vba came up with an error (not sure if its because I have excel 2003?)

    Anyway, assistance would be greatly appreciated

    thanks !!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: Removing duplicates from multiple columns (treating each column separately)

    try this one:
    Sub delete_dupl()
    Dim abc As Range

    With Worksheets("Sheet1")
    For Each abc In Range("A2:AA2")
    abc.EntireColumn.RemoveDuplicates 1
    abc.EntireColumn.Sort Key1:=abc(2, 1), _
    Order1:=xlAscending, Header:=xlYes
    Next abc
    End With

    Application.ScreenUpdating = True
    End Sub
    Like to say thanks ?Please use the star icon.

  3. #3
    Registered User
    Join Date
    01-02-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Removing duplicates from multiple columns (treating each column separately)

    awesome! thank you

  4. #4
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: Removing duplicates from multiple columns (treating each column separately)

    you welcome, i'm glad that i could help.

  5. #5
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Removing duplicates from multiple columns (treating each column separately)

    Its good code

+ 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