+ Reply to Thread
Results 1 to 5 of 5

How to look for duplicates in first column, then copy / paste contents of second column?

  1. #1
    Registered User
    Join Date
    03-19-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    How to look for duplicates in first column, then copy / paste contents of second column?

    Hi,

    Very new VBA user here, but ran across an Excel problem that is seemingly unsolvable without VBA.

    I have item #'s in column "A," (let's say, item 10, 11, 12, 13, 14...) and product #'s in column "B" (let's say product #'s AA, AB, AC, AD). Some items have more than one product associated.

    How can I put all the product #'s for each item onto one row? See attachment for a small sample of the data.

    Thanks for any help!!

    Here is how I tried to write the code:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by speedyhub; 03-21-2012 at 09:01 AM. Reason: Add Code Tags

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: How to look for duplicates in first column, then copy / paste contents of second colum

    please attache any workbook with dummy data and show us how output should looks like
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Registered User
    Join Date
    03-19-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How to look for duplicates in first column, then copy / paste contents of second colum

    Maczaq;

    I've added the file... Dziękuję bardzo!

    HK

  4. #4
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: How to look for duplicates in first column, then copy / paste contents of second colum

    Hello speedyhub,

    Finally I've created code for You - follow below points
    1. sort your source array regarding ID
    2. use provided procedure (copy it into module or to source code of your sheet)
    3. use autofilter for get expected result

    Please Login or Register  to view this content.
    If you will need any more help do not hasitate to post it.
    Last edited by MaczaQ; 03-21-2012 at 08:40 AM. Reason: code tidy up

  5. #5
    Registered User
    Join Date
    03-19-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How to look for duplicates in first column, then copy / paste contents of second colum

    Wow, Maczaq, thank you!! You actually coded the whole thing for me! This works great. Perfect. Thanks!

+ 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