編輯

共用方式為


Range.AdvancedFilter(XlFilterAction, Object, Object, Object) Method

Definition

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.

Applies to