+ Reply to Thread
Results 1 to 5 of 5

Paste Unique Values from Clipboard

Hybrid View

  1. #1
    cheungm@gmail.com
    Guest

    Paste Unique Values from Clipboard

    At my previous job someone wrote a macro that was able to take the
    information that was copied into the clipboard and only paste unique
    values in the selected area. I've been searching online for a way to
    do this but can't seem to find a solution. Can anybody help with this?


  2. #2
    Will.Cairns@gmail.com
    Guest

    Re: Paste Unique Values from Clipboard

    This will do the trick

    Sub Macro1()
    Columns("A:A").Select
    Range("A2:A6").AdvancedFilter Action:=xlFilterCopy,
    CopyToRange:=Range("B1" _
    ), Unique:=True
    End Sub


    cheungm@gmail.com wrote:
    > At my previous job someone wrote a macro that was able to take the
    > information that was copied into the clipboard and only paste unique
    > values in the selected area. I've been searching online for a way to
    > do this but can't seem to find a solution. Can anybody help with this?



  3. #3
    cheungm@gmail.com
    Guest

    Re: Paste Unique Values from Clipboard

    Thanks for the reply, but the macro you wrote does not allow me to
    dynamically select what I want to copy and where I would like to paste
    the information.


    Will.Cairns@gmail.com wrote:
    > This will do the trick
    >
    > Sub Macro1()
    > Columns("A:A").Select
    > Range("A2:A6").AdvancedFilter Action:=xlFilterCopy,
    > CopyToRange:=Range("B1" _
    > ), Unique:=True
    > End Sub
    >
    >
    > cheungm@gmail.com wrote:
    > > At my previous job someone wrote a macro that was able to take the
    > > information that was copied into the clipboard and only paste unique
    > > values in the selected area. I've been searching online for a way to
    > > do this but can't seem to find a solution. Can anybody help with this?



  4. #4
    cheungm@gmail.com
    Guest

    Re: Paste Unique Values from Clipboard

    Thanks for the reply, but the macro you wrote does not allow me to
    dynamically select what I want to copy and where I would like to paste
    the information.


    Will.Cairns@gmail.com wrote:
    > This will do the trick
    >
    > Sub Macro1()
    > Columns("A:A").Select
    > Range("A2:A6").AdvancedFilter Action:=xlFilterCopy,
    > CopyToRange:=Range("B1" _
    > ), Unique:=True
    > End Sub
    >
    >
    > cheungm@gmail.com wrote:
    > > At my previous job someone wrote a macro that was able to take the
    > > information that was copied into the clipboard and only paste unique
    > > values in the selected area. I've been searching online for a way to
    > > do this but can't seem to find a solution. Can anybody help with this?



  5. #5
    Will.Cairns@gmail.com
    Guest

    Re: Paste Unique Values from Clipboard

    Nor did your question have any desire to have that functionality.. the
    important part of the macro is the command..


    [MySourceRange].AdvancedFilter
    Action:=xlFilterCopy,CopyToRange:=Range([MyDestinationRange]),
    Unique:=True

    You should be able to work that command into whatever selection or
    variable ranges that your program is using.

    Best Rgds,
    Will


    cheungm@gmail.com wrote:
    > Thanks for the reply, but the macro you wrote does not allow me to
    > dynamically select what I want to copy and where I would like to paste
    > the information.
    >
    >
    > Will.Cairns@gmail.com wrote:
    > > This will do the trick
    > >
    > > Sub Macro1()
    > > Columns("A:A").Select
    > > Range("A2:A6").AdvancedFilter Action:=xlFilterCopy,
    > > CopyToRange:=Range("B1" _
    > > ), Unique:=True
    > > End Sub
    > >
    > >
    > > cheungm@gmail.com wrote:
    > > > At my previous job someone wrote a macro that was able to take the
    > > > information that was copied into the clipboard and only paste unique
    > > > values in the selected area. I've been searching online for a way to
    > > > do this but can't seem to find a solution. Can anybody help with this?



+ 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