ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Question on pivot tables (https://www.excelbanter.com/excel-programming/440895-question-pivot-tables.html)

Daniel Bonallack

Question on pivot tables
 
Let's say a pivot table has two fields - "country" and "fruit". There are
seven products and seven countries, and I want to flip through all 49
permutations.

However, if one product isn't present in one country (for example, let's say
"apple" does not exist in "england"), then rather than returning the error,
the vba code forces "apple" over the top of another fruit that does exist.
So the code firstly selects "england", then (if I were doing it manually) I
would drop down the fruit box and see that "apple" wasn't present. But the
code basically screws the pivot table.

My horrible workaround is to go to the raw data and filter on "England" and
"Apple", and (seeing no rows returned), I would skip this combination when
flipping the pivot.

There must be a better way...

Thanks in advance
Daniel



Herbert Seidenberg

Question on pivot tables
 
Excel 2007 PivotTable
GetPivotData, skip items with no data.
http://c0718892.cdn.cloudfiles.racks.../03_22_10.xlsm


All times are GMT +1. The time now is 10:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com