+ Reply to Thread
Results 1 to 18 of 18

Finding duplicates and copy/paste duplicates to new column

  1. #1
    Registered User
    Join Date
    01-08-2020
    Location
    Gary, Indiana
    MS-Off Ver
    10
    Posts
    7

    Question Finding duplicates and copy/paste duplicates to new column

    Hello Guys,

    I am new to VBA and would love some help.

    I need to find the duplicates and then paste them into the new column. After that I need to highlight the populated cells in the new column



    I have attached the small table
    Attached Files Attached Files
    Last edited by HometownHero; 01-09-2020 at 12:07 PM. Reason: New Excel File

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Finding duplicates and copy/paste duplicates to new column

    Can you attach a short EXCEL file with data and example of the final result you want.
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    01-08-2020
    Location
    Gary, Indiana
    MS-Off Ver
    10
    Posts
    7

    Re: Finding duplicates and copy/paste duplicates to new column

    Thank you for the help, I attached below
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Finding duplicates and copy/paste duplicates to new column

    See next code
    Please Login or Register  to view this content.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Finding duplicates and copy/paste duplicates to new column

    @PCI,

    Good one PCI, however, you could do without the "Dic" and "Scripting Dictionary". i.e.;

    Please Login or Register  to view this content.
    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Finding duplicates and copy/paste duplicates to new column

    you could do without the "Dic" and "Scripting Dictionary". i.e.;
    Yes it was the first idea but it's not used, instead is used Evaluate ... some clean up is missing, Thx Winon for the comment

  7. #7
    Registered User
    Join Date
    01-08-2020
    Location
    Gary, Indiana
    MS-Off Ver
    10
    Posts
    7

    Re: Finding duplicates and copy/paste duplicates to new column

    Thank you both very much! I am trying to learn VBA and it is a real challenge for me!

    Cheers!

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Finding duplicates and copy/paste duplicates to new column

    You're welcome and Thx for the Rep ...

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Finding duplicates and copy/paste duplicates to new column

    Glad we could help.

    You're welcome and Thank You for the Rep...It is appreciated!

    Regards.

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Finding duplicates and copy/paste duplicates to new column

    Just for the fun of it...
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    red part, as per your blue part, just for you Tsjaart as I know how meticulous you are...
    Last edited by sintek; 01-09-2020 at 05:52 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  11. #11
    Registered User
    Join Date
    01-08-2020
    Location
    Gary, Indiana
    MS-Off Ver
    10
    Posts
    7

    Re: Finding duplicates and copy/paste duplicates to new column

    Thank you for the help, I have one question. Instead of the cells being in a1, I need the formula to work if they were in cells S12:V19. How would I fix that code to make it work

  12. #12
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Finding duplicates and copy/paste duplicates to new column

    It means it is covering 4 columns, 2 for source1 and 2 for source2?
    If yes you want to compare what ever cells are in the first or second column.
    The final display still in column D ?
    Can you attach an update of your file ??

  13. #13
    Registered User
    Join Date
    01-08-2020
    Location
    Gary, Indiana
    MS-Off Ver
    10
    Posts
    7

    Re: Finding duplicates and copy/paste duplicates to new column

    I have edited the post with the correct excel file

  14. #14
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Finding duplicates and copy/paste duplicates to new column

    Please Login or Register  to view this content.
    Last edited by sintek; 01-09-2020 at 12:50 PM.

  15. #15
    Registered User
    Join Date
    01-08-2020
    Location
    Gary, Indiana
    MS-Off Ver
    10
    Posts
    7

    Re: Finding duplicates and copy/paste duplicates to new column

    Thank you!

  16. #16
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Finding duplicates and copy/paste duplicates to new column

    ..............................................
    Thanks.gif

  17. #17
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Finding duplicates and copy/paste duplicates to new column

    Here we are
    Please Login or Register  to view this content.

  18. #18
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Finding duplicates and copy/paste duplicates to new column

    For the fun see next code
    Adjust Const to your next update ...!
    Please Login or Register  to view this content.

+ 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. Copy data from some tabs, paste it in one column in another tab and then erase duplicates
    By Vicente Rojas in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-01-2017, 10:30 AM
  2. [SOLVED] Help with VBA Finding Duplicates and Copy in new sheet
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-08-2016, 10:20 AM
  3. Replies: 1
    Last Post: 10-06-2015, 08:32 AM
  4. Copy columns, remove duplicates and paste different worksheet and column query
    By Chris* in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2014, 06:52 AM
  5. Replies: 2
    Last Post: 12-27-2013, 09:24 AM
  6. [SOLVED] Copy data from two columns and paste without duplicates in another column
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2012, 07:56 PM
  7. Replies: 4
    Last Post: 03-21-2012, 08:58 AM

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