281
Using New Pivot Table Features in Excel 2007
PT.PivotFields(“Branch”).PivotFilters.Add _
Type:=xlValueIsBetween, _
DataField:=PT.PivotFields(“Sum of Revenue”), _
Value1:=50000, Value2:=100000
Table 11.3 lists all the possible filter types.
Table 11.3 Filter Types
Filter Type
Description
xlBefore
Filters for all dates before a specified date
xlBeforeOrEqualTo
Filters for all dates on or before a specified date
xlAfter
Filters for all dates after a specified date
xlAfterOrEqualTo
Filters for all dates on or after a specified date
xlAllDatesInPeriodJanuary
Filters for all dates in January
xlAllDatesInPeriodFebruary
Filters for all dates in February
xlAllDatesInPeriodMarch
Filters for all dates in March
xlAllDatesInPeriodApril
Filters for all dates in April
xlAllDatesInPeriodMay
Filters for all dates in May
xlAllDatesInPeriodJune
Filters for all dates in June
xlAllDatesInPeriodJuly
Filters for all dates in July
xlAllDatesInPeriodAugust
Filters for all dates in August
xlAllDatesInPeriodSeptember
Filters for all dates in September
xlAllDatesInPeriodOctober
Filters for all dates in October
xlAllDatesInPeriodNovember
Filters for all dates in November
xlAllDatesInPeriodDecember
Filters for all dates in December
xlAllDatesInPeriodQuarter1
Filters for all dates in Quarter 1
xlAllDatesInPeriodQuarter2
Filters for all dates in Quarter 2
xlAllDatesInPeriodQuarter3
Filters for all dates in Quarter 3
xlAllDatesInPeriodQuarter4
Filters for all dates in Quarter 4
xlBottomCount
Filters for the specified number of values from
the bottom of a list
xlBottomPercent
Filters for the specified percentage of values
from the bottom of a list
xlBottomSum
Sums the values from the bottom of the list
xlCaptionBeginsWith
Filters for all captions beginning with the speci-
fied string
11
continues
12_0789736012_CH11.qxd 12/11/06 6:26 PM Page 281
Содержание VBA
Страница 60: ......