PDA

View Full Version : Solved: CopyToRange then delete duplicate



jammer6_9
07-13-2009, 06:54 AM
I was trying to Copy a range and delete the duplicates BUT below code do not delete all duplicates :help


Private Sub Worksheet_Change(ByVal Target As Range)
Range("o3:o20").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"o3:o20"), CopyToRange:=Range("o23:o40"), Unique:=True

End Sub

Bob Phillips
07-13-2009, 07:02 AM
Is it the first item still duplicated? If so, try inserting some text in O2 and extend the range, it is a header thing.

jammer6_9
07-13-2009, 07:15 AM
Yes indeed it was a header thing. Thanks as usual xld.


Is it the first item still duplicated? If so, try inserting some text in O2 and extend the range, it is a header thing.

jammer6_9
07-13-2009, 07:17 AM
Why I can't find on Thread Tools the option to marked this thread as solved? :bug: