+ Reply to Thread
Results 1 to 5 of 5

Macro: Remove Duplicate before Pasting Text (on selected cells)

  1. #1
    Registered User
    Join Date
    06-05-2012
    Location
    Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Macro: Remove Duplicate before Pasting Text (on selected cells)

    Hi all members,

    Using this macro, when you select several cells (using ctrl+click) , for example cell B12 + C13 + D16 (then run the macro), it will will copy values of cell I12, I13, I16. In otherword, no matter which cells you selected, it will always copy cell of column "I" (under that same row the cell was selected)

    (originally from a guy call Karan and modified by Alphafrog in this thread)
    Please Login or Register  to view this content.

    Now the problem is, sometime the selected cells contain same values (duplicate)

    Can someone help modify this macro so that it will copy and remove duplicates value, if any. (the remove process should be done before pasting the data into other media, such as notepad)

    p.s: my knowledge in VB is way below basic

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Macro: Remove Duplicate before Pasting Text (on selected cells)

    This should do it

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    06-05-2012
    Location
    Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Macro: Remove Duplicate before Pasting Text (on selected cells)

    Dear Mike, tons and tons of thanks to you....it works just like i wish for.

    this is the final looks of the macro that i implement (see the blue comments)

    Please Login or Register  to view this content.
    many thanks again mike

    regards,
    rampal

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Macro: Remove Duplicate before Pasting Text (on selected cells)

    Why are you using?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-05-2012
    Location
    Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Macro: Remove Duplicate before Pasting Text (on selected cells)

    i prefer the data be putted in the clipboard (instead of in a pop-up msgbox) so it can be pasted into word or notepad
    that's why i changed back to the original

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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