I have this excel VBA code
Sub Module() Range(\"A1:A10\").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range(\"D1\"), Unique:=True End Sub
Insert another cell above cell A1. Write "Header" or any other text in this box. Change the range to A1:A11. This should solve your problem.