'Set filter range and filter column (column with names)
Set FilterRange = Ash.Range("A" & HdrRow & ":M" & Lastrow)
FieldNum = 7 'Filter column = G because the filter range start in column G
'Add a worksheet for the unique list and copy the unique list in A1
Set Cws = Worksheets.Add
FilterRange.Columns(FieldNum).AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Cws.Range("A1"), _
CriteriaRange:="", Unique:=True
This code does what it is supposed to do. Copies Unique entries in Column 7 to a new worksheet. (This code came from rondebruin)
However, the data is prefiltered and I only want it to copy Visible Unique Entries in Column 7.
The filter is Column 5 is >= DATE - B2 (B2 contains 90)
I can't figure out how to put this into CriteriaRange.
adding .SpecialCells(xlCellTypeVisible) to FilterRange did not do the trick
Bookmarks