'How to change the data type of manually added pivot items?
I have a pivot table with summary for each month. It has a requirement that information must be displayed for each month of the year, even if there is no data. In particular, future months should be presented. One approach to fulfill this requirement is to artificially add the missing months to the final summary by PivotItems.Add MonthNumber. In general, it works. But there is one roughness that I would like to solve. In the resulting table, the months represented in the source data are numbers. Whereas the added ones are always strings. An attempt to explicitly set NumberFormat does not affect the result. What am I missing?
Is it possible to change the data type of the manually added pivot items?
And if so, how do I do this?
For demonstration purposes, let's say this is my data with a pivot table:
You can see the result of my experiments in the Immediate Window on the next screenshot:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


