Hi,
I have two colums of data Col A and Col B.
I want to run an advanced filter on Col A to extract unique values.
I then want to Autofilter Col A by each value in the previously extracted unique list in turn and extract a unique list from Col B.
So far i have extrcated the unique list and applied autofilter.
My questions are:
How do i build a For Each Next loop which goes through each of the extracted unique values and filters on Col A extracting unique values in Col B?
Is there an altogether simpler way of doing this or am i on the right track?
thanks in advance, i attach my slimmed down WB for clarity.
cheers
Neil
code so far is
Sub Unique()
Dim RngPort As Range
Dim RngKost As Range
Dim RngCrit As Range
Set RngPort = Range("a2", Range("a2").End(xlDown))
RngPort.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=RngPort, _
CopyToRange:=Range("D1"), Unique:=True
Set RngCrit = Range("d1", Range("d1").End(xlDown))
Range("A:B").AutoFilter
End Sub
Display More