I have a named range in excel. I'm used to filtering for unique values in access using SQL but here I am stumped. I need to populate a dropdown with a list of dates. The dates are all in one column, but the date can be repeated hundreds of times. Right now I just have a range that lists every date in the column.
There has to be some good way to filter this for unique values. I tried using AdvancedFilter but couldn't make it work. Is there a way I can use this or should I do some kind of loop?
Every date is in column A of sheet1:
Dim RDates as Range
Dim RDates2 as Range
Set RDates = Sheets("Sheet1").Range("A2", Sheets("Sheet1").Range("A2").End(xlDown))
'This errors out, not sure what I am doing wrong
Action:=xlFilterCopy, CopyToRange:=RDates2, Unique:=True