Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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


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.


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


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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I paste a unique values list? jak roodi Excel Discussion (Misc queries) 14 April 22nd 23 08:10 AM
Paste from clipboard only taa Excel Worksheet Functions 0 January 14th 08 06:15 PM
Store clipboard before "vba do cut&paste" then recover stored information to clipboard? Marie J-son[_7_] Excel Programming 0 February 8th 06 05:59 AM
Copy & Paste Unique Cells Values jindon[_3_] Excel Programming 0 June 1st 05 12:14 PM
Paste, clipboard Lars Kofod Excel Programming 1 December 3rd 03 05:03 PM


All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"