Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

Unless you copy the range to a new worksheet it leaves the current worksheet with filtering on which can cause issues with end users trying to continue to manually manipulate the data. I prefer to use "RemoveDuplicates"

Parameters


NameRequired/OptionalData typeDescription
ActionRequiredXlFilterActionOne of the constants of XlFilterAction specifying whether to make a copy or filter the list in place.
CriteriaRangeOptionalVariantThe criteria range. If this argument is omitted, there are no criteria.
CopyToRangeOptionalVariantThe destination range for the copied rows if Action is xlFilterCopy. Otherwise, this argument is ignored.
UniqueOptionalVariantTrue to filter unique records only. False to filter all records that meet the criteria. The default value is False.

Specifies whether data is to be copied or left in place during a filter operation.

NameValueDescription
xlFilterCopy2Copy filtered data to new location.
xlFilterInPlace1Leave data in place.

https://docs.microsoft.com/en-us/office/vba/api/excel.range.advancedfilter

NOTE: You must have a "Header" or the filter won't look at the first cell and compare w/ the rest.

See → https://stackoverflow.com/questions/43536795/range-advancedfilter-ignores-first-row

  • No labels