Hi
I have this pivot issue that I'd like to have some help with.
I'm using VBA to write a macro that should pick values from a Pivot and put them in a table.
Say for example I am selling clothes. I can get a "Count of Clothes" using:
This will put, say, 50 in the variable iVal.
I can also filter for shoes:
This works great as long as there are shoes in the filtered Pivot. But if there are no shoes, the function seems to return 50 instead of 0.
How do I make the code to return a 0 please?
I have this pivot issue that I'd like to have some help with.
I'm using VBA to write a macro that should pick values from a Pivot and put them in a table.
Say for example I am selling clothes. I can get a "Count of Clothes" using:
Code:
iVal = myWorkSheet.myPivot.GetPivotData("Count of Clothes")
I can also filter for shoes:
Code:
iVal = myWorkSheet.myPivot.GetPivotData("Count of Clothes", "Type", "Shoes")
How do I make the code to return a 0 please?