Good afternoon - I have ran into another probelm and my searching is yeidling nothing.
I need to validate the data in column B - checking for uniqueness as well as checking to see if it is unique for the data in column A (Type in my example below).
There would be an error because Name1 appears twice for Type 1. Does that make sense?
If there is an error recieved I then need it to copy the duplicate row of information to an error log spreadsheet and delete in the current spreadsheet. I am not sure on how to do this and hoping someone here can lend a hand.
Here is the code I have so far that doesn't seem to work - it worked at one time but only copied the non-duplicated data (in column a and b ) to a new worksheet in the activeworkbook instead of a new workbook.
Sub MakeUnique()
Dim wsNew As Worksheet
Dim wsStart As Worksheet
Set wsStart = ActiveSheet
Set wsNew = xlApp.Workbooks.Create("C:\AvonExport\Error\errors.xls")
With wsStart
.Range("A1", .Cells(.Rows.Count, "B").End(xlUp)).AdvancedFilter _
xlFilterCopy, , wsNew.Cells(1, 1), True
End With
End Sub