Hi, I'm trying to create a macro that would allow me to filter a table with a dynamic range.
Would like to be able to filter the data based on two criteria (Vent Size and Train); the data filtered can be either from one of the two or both at the same time.
When I attempted to copy the data source from "Data" to "FilterData", the content isn't there. Instead, it was replaced with a blank table.
I have a few named ranges; "Extract" refers to the table heading, which I would like my content to be copied over. "Criteria" is the criteria used for filtering.
This is the code of the filter macro.
Sub Filterme()
' Filterme Macro
Sheets("Data").Range("D4").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("FilterData!Criteria"), CopyToRange:=Range( _
"FilterData!Extract"), Unique:=False
End Sub
Bookmarks