Range.AdvancedFilter(XlFilterAction, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Filters or copies data from a list based on a criteria range.
public object AdvancedFilter (Microsoft.Office.Interop.Excel.XlFilterAction Action, object CriteriaRange, object CopyToRange, object Unique);
Public Function AdvancedFilter (Action As XlFilterAction, Optional CriteriaRange As Object, Optional CopyToRange As Object, Optional Unique As Object) As Object
Parameters
- Action
- XlFilterAction
Required XlFilterAction. Can be one of the following XlFilterAction constants:xlFilterCopyxlFilterInPlace
- CriteriaRange
- Object
Optional Object. The criteria range. If this argument is omitted, there are no criteria.
- CopyToRange
- Object
Optional Object. The destination range for the copied rows if Action is xlFilterCopy
. Otherwise, this argument is ignored.
- Unique
- Object
Optional Object. True to filter unique records only; False to filter all records that meet the criteria. The default value is False.
Returns
Remarks
If the initial selection is a single cell, that cell's current region is used.