I have tried unsuccessfully to filter multiple columns (of sheet data) and then copying a filtered column to another sheet (sheet2). Initial situation: The headers are in row 4:4
- Filter column A by the string "SENR"
- Copy the unique entries of column B into another sheet.
What have I achieved so far? I was able to implement point 2) with the following code:
Sub CreateUniqueList()
Dim LastRow As Long
Sheets("data").Select
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
ActiveSheet.Range("B5:B" & LastRow).AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Sheets("sheet2").Range("A1"), _
Unique:=True
End Sub
However, I don't manage filter column A first according to point 1). Does anyone here have an idea?