+ Reply to Thread
Results 1 to 6 of 6

Remove duplicates loop through columns

  1. #1
    Registered User
    Join Date
    01-05-2011
    Location
    nh
    MS-Off Ver
    Excel 2010
    Posts
    4

    Exclamation Remove duplicates loop through columns

    I am looking to get a macro to remove duplicates from individual columns, doing so until it's finished with all the columns. I imagine this would be easy-ish for you Excel wizards!

    Example:

    A B C
    Cat Cat Cat
    Dog Cat Bird
    Bird Dog Bird

    Goes to:

    A B C
    Cat Cat Cat
    Dog Dog Bird
    Bird

    Any help please? You guys did an amazing job last time, so I figured I'd try my luck again.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,351

    Re: Remove duplicates loop through columns

    Hi closerb4,

    In Excel 2010 you can do this easily.
    First Select the entire B Column and then click on the Data Tab.
    Find and click on the Remove Duplicates.
    Click the Radio Button of "Continue with the current selection" and
    Click "Remove Duplicates..."

    Do the above with each individual Column and you have it.

    If you want VBA code that does the above Please respond witht the request.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Remove duplicates loop through columns

    To add to MarvinP, if you have a lot of columns that you need to do this for, you could do it quickly with a macro. Try this:
    Please Login or Register  to view this content.
    You may need to adjust the columns range to match your range.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,351

    Re: Remove duplicates loop through columns

    Hi,
    Here is the code BUT be careful as this will remove all relationship between data in a single row. This is very dangerous code as it could mess up your entire data structure.
    Please Login or Register  to view this content.
    Only use the above if you can lose your data (or know exactly what it does).

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Remove duplicates loop through columns

    see old-fashioned way, run macro "Un", result on sheet 2
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-05-2011
    Location
    nh
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Remove duplicates loop through columns

    Thank you, I will try these out. There is no horizontal relationship between the data. Each column is for a new "Person" and all the rows come to me as things they've selected. So it doesn't matter if the rows don't correspond between columns, I just need something that will go out to many columns, often into the FF range.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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