+ Reply to Thread
Results 1 to 8 of 8

Remove Duplicated from multiple column

  1. #1
    Registered User
    Join Date
    11-04-2015
    Location
    London, england
    MS-Off Ver
    2007
    Posts
    60

    Remove Duplicated from multiple column

    I need to remove duplicate from two columns with a vba any ideas?
    Capture.JPG

    So bacically as you can see i want both colums to only have unique values

    I have tried
    Please Login or Register  to view this content.
    but it did not work
    Attached Images Attached Images
    Last edited by shelim481; 02-20-2020 at 11:31 AM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,279

    Re: Remove Duplicated from multiple column

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    492

    Re: Remove Duplicated from multiple column

    Hi

    that code will treat the 2 column values as "pairs" and will only remove a "repeated-pair"
    ..so what you are asking for is a loop that will remove any duplicate found in the 'selected' or 'specified' range-block.

    zeddy

  4. #4
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    492

    Re: Remove Duplicated from multiple column

    Hi

    Bernie's code will remove any cell in column B that is already in column A
    ..but it won't remove any duplicates that already exist in column A

    zeddy

  5. #5
    Registered User
    Join Date
    11-04-2015
    Location
    London, england
    MS-Off Ver
    2007
    Posts
    60

    Re: Remove Duplicated from multiple column

    If there is duplicated in column A this does not work as intended, any solutions, i think it was my mistake i showed the wrong numbers

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Remove Duplicated from multiple column

    Please Login or Register  to view this content.
    edit: add second check for duplicates in col. A
    Last edited by KOKOSEK; 02-20-2020 at 11:37 AM.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  7. #7
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    492

    Re: Remove Duplicated from multiple column

    ..maybe just add this line to Bernie's code..
    Please Login or Register  to view this content.
    zeddy

  8. #8
    Registered User
    Join Date
    11-04-2015
    Location
    London, england
    MS-Off Ver
    2007
    Posts
    60

    Re: Remove Duplicated from multiple column

    Cool thank you all, much appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Remove many unwanted/duplicated styles
    By Vaslo in forum Excel General
    Replies: 9
    Last Post: 11-24-2014, 12:54 AM
  2. Replies: 26
    Last Post: 07-29-2014, 06:38 PM
  3. Remove Duplicated items in combo box
    By FRIEL in forum Excel General
    Replies: 11
    Last Post: 12-03-2012, 04:26 PM
  4. Replies: 3
    Last Post: 09-11-2012, 02:19 AM
  5. Replies: 6
    Last Post: 03-26-2012, 05:12 PM
  6. Remove Combobox Duplicated items
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2009, 02:35 AM
  7. Remove ALL duplicated records, leaving behind NONE
    By Christopher Dawes in forum Excel General
    Replies: 2
    Last Post: 06-06-2005, 07:05 PM

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