Advanced Filter Unique not working. Bemused

13 Views Asked by At

I'm looking to generate a list of unique values. My data is in the range M10:M60. I'm using the following code to generate the unique list:-

Worksheets("Output").Range("M10:M60").AdvancedFilter xlFilterCopy, , _ Worksheets("Output").Range("AB10:AB60"), Unique:=True

The code returns only the Header value and no other values at all. Any ideas?

I've tried using Autofilter, then copying the visible rows, pasting them to an output sheet and finally removing duplicates. This works, but takes an inordinate amount of time. So I'm trying to use AdvancedFilter which works very quickly indeed, but fails on the Unique:=True bit.

0

There are 0 best solutions below