Class PivotFilter (Excel VBA)
A PivotFilter is applied to a PivotField object.
The main procedure of class PivotFilter is Delete
To use a PivotFilter class variable it first needs to be instantiated, for example
Dim pvtf As PivotField: Set pvtf = Dim pvtfilAdd2 As PivotFilter Set pvtfilAdd2 = pvtf.PivotFilters.Add2(Type:=xlAfter, Name:="", Description:="")
Here is an example of processing the PivotFilter items in a collection.
Dim pvtf As PivotField: Set pvtf = Dim pvtfilPivotFilter As PivotFilter For Each pvtfilPivotFilter In pvtf.PivotFilters Next pvtfilPivotFilter
The following procedures in this class have been grouped together and are described on a separate theme page
This is the main method of the PivotFilter class
Delete - Deletes the filter and removes it from the filter collections of the PivotField and the PivotTable.
Active returns whether the specified PivotFilter is active.
DataCubeField this property is applicable only to OLAP PivotTables and provides the Value field (PivotField in the Values area) being filtered by for a value filter.
DataField this property is applicable only to non-OLAP PivotTables and provides the Value field (PivotField in the Values area) being filtered by for a value filter.
Description provides an optional description for the PivotFilter object.
FilterType specifies the type of filter to be applied.
IsMemberPropertyFilter specifies whether the label filter is based on the PivotItem captions of a member property of the field or on the PivotItem captions of the PivotField itself.
MemberPropertyField this property specifies the member property PivotField on which the label filter is based.
Name this property provides the option of naming filters for reference. You cannot rely on the index value for accurate reference because this value can change.
Order specifies the evaluation order of the filter among all Value filters applied to the entire PivotTable.
Parent returns the parent object for the specified PivotFilter object. Read-only.
PivotField specifies the PivotField to which the filter is applied.
WholeDayFilter sets or gets the filtering semantics for date filters.
PivotFilters.Count returns the number of items in the PivotFilters collection.
PivotFilters.Item returns a specific element of the PivotFilters collection object by its position in the collection.
PivotFilters.Parent returns the parent object for the specified PivotFilters object. Read-only.