+ Reply to Thread
Results 1 to 5 of 5

Macro to Compare Multiple Columns and Remove Unique Entries

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    65

    Macro to Compare Multiple Columns and Remove Unique Entries

    Hi,

    I have data over several columns and I want to compare them (compare text columns) to remove the unique values found in each of them. At the end I want the equal number of data in each column. Please have a look at the data form in this image data sample image.jpg

    Usually, the first column is the text data (must be same in all text columns), i.e. the name of the group and the second column is numeric data. When I want to remove unique values I want both the columns to be removed (text and numeric) that contain the unique entry. At the end I want only one text column and the remaining numeric data columns. That should look something like this image here final result data image.jpg

    So far I tried otherwise to extract the duplicates in separate columns, I used the formula starting from the column V (cell V2, since row 1 is header) until AF2 and the fill down the row:

    Please Login or Register  to view this content.
    However, it is not working good, can you tell me why? How can I do otherwise to get the desired result? Please ask me if you couldn't get the problem, that shouldn't refrain you from approaching me to help.
    Can we compare the text columns and if unique found remove it along with its corresponding numeric column?
    Thanks alot!
    Sanjeev

  2. #2
    Registered User
    Join Date
    01-21-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Macro to Compare Multiple Columns and Remove Unique Entries

    Please Login or Register  to view this content.
    this is the code for text to whole columns.

  3. #3
    Registered User
    Join Date
    01-21-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Macro to Compare Multiple Columns and Remove Unique Entries

    you use this code and see what the outcome. thank you.

  4. #4
    Registered User
    Join Date
    11-27-2012
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Macro to Compare Multiple Columns and Remove Unique Entries

    THanks sky1in5 for replying. I used your code but it did nothing, I used it in the following way:

    Please Login or Register  to view this content.
    What I want to do is to compare all the text columns and delete unique values among them, so at the end all the columns will have same number of rows. because later I will have to subtract all subsequent data rows with the data in 2nd column, so all the numeric data in rows must correspond to the same group in the same row in the text column. here is the data sample excel file Sample.xlsx
    Last edited by sanjeevpandey; 01-24-2013 at 05:55 AM.

  5. #5
    Registered User
    Join Date
    01-21-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Macro to Compare Multiple Columns and Remove Unique Entries

    hopefully some expert can help you.

+ 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