Hello All,

I have a macro that filters a list and copies the unique values into a new sheet, relevant code sections shown below

My_Range.Columns(FieldNum).AdvancedFilter _
                Action:=xlFilterCopy, _
                CopyToRange:=.Range("A3"), Unique:=True

My_Range.Columns(FieldNum2).AdvancedFilter _
                Action:=xlFilterCopy, _
                CopyToRange:=.Range("B3"), Unique:=True
The problem i am having is that the lists are not matched, see example below


Company Code

BBC | ABC
BBC LTD | ABC
Disney | CBA

When the unique list is generated, this results in mistmatched columns, in the above example BBC should have only one entry as the code is the same..but what happens is there is a entry for BBC and one for BBC LTD, the macro carries on and on the results table it ends up like shown below

BBC | ABC
BBC LTD | CBA
Disney | empty

I know that the BBC and BBC LTD are not the same but it should use the Code as the first criteria and then use the company name as the second criteria.

Any suggestions on how i can implement that?

Thank you