Hello,
My range goes from col A to col N, col A is the criteria for making unique it if filed with serial#
The "Sub CopyToNewMakeUnique()" filter copies but does not make unique, this is the first time I have tried this so maybe I do not understand what the unique is actually doing or I am not applying it properly.
I know I could filter copy then apply
But I was hoping to get the "Sub CopyToNewMakeUnique()" to copy only Unigue
Thanks
What I have
what I need
My range goes from col A to col N, col A is the criteria for making unique it if filed with serial#
The "Sub CopyToNewMakeUnique()" filter copies but does not make unique, this is the first time I have tried this so maybe I do not understand what the unique is actually doing or I am not applying it properly.
I know I could filter copy then apply
Code:
Sub RemoveDupeHelper()
Sheets(2).Select
' Remove duplicates, looking for unique values in columns A (Columns:=1).
ActiveSheet.[A1].CurrentRegion.RemoveDuplicates Columns:=1, Header:=xlYes
Range("A1").End(xlDown).Offset(1).Resize(ActiveSheet.UsedRange.Rows.Count).EntireRow.Delete
End Sub
But I was hoping to get the "Sub CopyToNewMakeUnique()" to copy only Unigue
Thanks
What I have
Code:
col A col B . . . col N
456 Stuff1 stuffn
456 . .
123 . .
123
789
159
456
159 . .
what I need
Code:
col A col B . . . col N
456 stuff1 stuffn
123 . .
789 . .
159 stuffx stuffr
Code:
Sub CopyToNewMakeUnique()
Dim lRow As Long
Sheets(1).Select
lRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Sheets("Source").UsedRange.AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Sheets(1).Range("A1:A" & lRow), _
CopyToRange:=Sheets(2).Range("A1"), _
Unique:=True
End Sub