Excel pivot tables do not always maintain the formatting of a field. For example, you may desire that the contents be centered but when the pivot table is refreshed or filtered Excel may decide to left justify some of the contents while leaving other content centered leading to a snaggled-toothed and unprofessional appearance. This macro forces the field back into submission.
It has 5 parameters
- SheetName = the name of the sheet containing the pivot table
- PivotName = the name of the pivot table containing the field to be formatted
- FieldName = the name of the field to be formatted
- HAlign (Optional) = the desired horizontal alignment
- VAlign (Optional) = the desired vertical alignment
It is suggested that this macro be called with an Update Pivottable event.![]()
Please Login or Register to view this content.
Bookmarks