View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
satishbhave satishbhave is offline
external usenet poster
 
Posts: 7
Default how to parse through pivot filtered items

I am surprised to see no help coming my way....is there any one worked with
pivot tables and vba programming ? any help from microsoft excel deveopers
themselves???
-satish

"satishbhave" wrote:

Hi,

Excel provides visibleitems property on pivottables but there is no such
property called FilteredItems. if we have to select only filetered items in
vba program, what's the best way to do it...

say i have a pivotfield (customers#) which has say 100 items in it, if I
apply various pivotfilters (labelfilters as well as manual filters), let's
say the items reduce to 10 only, how do i parse through these 10 items only
instead of all 100 items ?

i am using below now

pvtbl1.pivotfields("customers#").pivotfilters.add value1:="xyz"
for each pvitem in pvtbl1.pivotfields("customers#").visibleitems
...
...
do something here
...
next pvitem


as you can see, even though i apply pivotfilter, i need to parse through all
100 visible items under Customer# field, where as on the screen I see only 10
items as filters are applied...

any suggestions ?
-satishbhave