+ Reply to Thread
Results 1 to 14 of 14

Extract similar data in columns and different data in another column

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Extract similar data in columns and different data in another column

    Hello everybody
    I have in Data sheet two lists (List one is in column A & B - List Two is in column D & E)

    There are similar data in columns A & D
    In the output sheet I need to check the similar data and bring each similar data (in A & D ) besides each other
    and the unique data in columns A & D to be in separated columns G & H

    There is the desired output needed ..
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extract similar data in columns and different data in another column

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract similar data in columns and different data in another column

    Thanks a lot Mr. John for this great solution.
    There is a problem with the original file as there are large amounts of data (30,000 rows) so it takes long time
    If it is possible to use arrays to do that task ..
    Thanks advanced

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract similar data in columns and different data in another column

    Hi,

    Please Login or Register  to view this content.

    Regards

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extract similar data in columns and different data in another column

    Maybe this will help?

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract similar data in columns and different data in another column

    Thanks a lot Mr John for this modification. It makes the code better but it still slow a little
    Mr. Karedog
    I'm admired of your solutions as you are perfect at using array which considered faster than looping with large amounts of data
    I'm sorry for bothering you again
    I need the desired output to be in the output sheet and to change a little in the layout if possible (illustrated again in the attachment)
    Sorry for changing my layout ...
    Attached Files Attached Files

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract similar data in columns and different data in another column

    I cannot catch your expected output with current data.

    Please add more data like this :
    on cell A7, add "H"
    on cell D6, add "I"

    What is the expected result ?

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract similar data in columns and different data in another column

    Mr. Karedog
    I have two lists (each list in two columns) in Data sheet
    Required to have the similar strings in column A & D (or in other words exist in the two lists) and put these similar data next to other then ...
    as for not existed in the two lists to be put away in separated column
    The output is the outline of my desired results

  9. #9
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract similar data in columns and different data in another column

    What I want to know is the order of the unique data, are they proceed by columns or by rows ?

    From your current file (post #6) :
    if proceed by columns (collect all uniques from column A first, then advanced to column D), the result is B, E, G
    if proceed by rows (collect all uniques from row 1 first, then advanced to row 2, etc), the result is also B, E, G
    Both method yield same result, so I don't know which method that you want.


    But if more data is added as in post #7 :
    on cell A7, add "H"
    on cell D6, add "I"

    if proceed by columns, the result is B, E, H, G, I
    if proceed by rows, the result is B, E, G, I, H
    Two methods yield different result.


    Or, is the order is not important at all ?

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract similar data in columns and different data in another column

    The order is not important ..
    The result should be as you mention B, E, G

  11. #11
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract similar data in columns and different data in another column

    Please Login or Register  to view this content.

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract similar data in columns and different data in another column

    Thank you very much
    It is very long but impressive
    Thanks a lot for this wonderful solution

  13. #13
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Extract similar data in columns and different data in another column

    If the blank and comment lines are ripped, and I "borrow" some of famous member's coding style, the code can be compressed so much.

    Please Login or Register  to view this content.

  14. #14
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Extract similar data in columns and different data in another column

    Thank you very much for caring about that
    Regards

+ 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. [SOLVED] Extract all similar data in four sheets
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-20-2015, 10:58 AM
  2. [SOLVED] Extract data from third column where data in two other columns match
    By redimp in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-16-2014, 10:01 AM
  3. Replies: 7
    Last Post: 09-15-2013, 12:09 PM
  4. Replies: 8
    Last Post: 09-12-2013, 09:17 AM
  5. Copy Similar Data from Two or More Columns into a Third Column
    By pglagaris in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-14-2013, 05:15 PM
  6. Replies: 2
    Last Post: 04-18-2013, 05:56 PM
  7. [SOLVED] Extract data from column to make new columns
    By cinco5 in forum Excel General
    Replies: 2
    Last Post: 10-10-2012, 04:18 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