There is a raw data sheet from which i am outputting distinct (unique) values on a separate sheet for a number of columns. This is working fine for one column with code like this;
Sheets("Raw Data").Range("A1:A5000").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheets("Uniques").Range("D3"), Unique:=True
However, i would like to output distinct combination from two columns that are not next to each other. Example below is columns D & F Here is the code i've tried:
Sheets("Raw Data").Range("D1:D5000,F1:F5000").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheets("Uniques").Range("F3:G3"), Unique:=True
The error: Table range is not valid. Is it possible to overcome this without re-arranging the column order?
Bookmarks