Maintaining pivot table formatting

  • Thread starter Thread starter gonger
  • Start date Start date
G

gonger

i have a macro that creates a pivot table based on some user inputs an
then i do some formatting on the pivot table just for show. th
problem is that i can't maintain the formatting if the user decides t
alter the pivot table (i.e. change one of the field drop downs fro
showing "All" data to some subset of it.)

i've already tried to set the preserve formatting feature to true, bu
that didn't work .... any ideas?

thank
 
You can't... It is one of the weaknesses in pivot tables. You can use the
supplied auto formats but any other formats will not be dynamic with changes
to the pivot table.

If you are using xl2002 or better then you can react to the pivot_change
event and then remove the old formats and reply the formats...
 
Right-click a cell in the pivot table, and choose Table Options
Ensure that Preserve Formatting is turned on, and AutoFormat is turned off.
Click OK

To format cells, enable selection should be turned on.
To enable selection --
From the Pivot toolbar, choose PivotTable>Select
If it's not already activated, click on Enable Selection

To format a section of a pivot table, e.g. subtotals --
Move the pointer to the left of a subtotal heading in the pivot table.
When the black arrow appears (like the one that appears when the pointer
is over a row button), click to select the subtotal rows in the pivot table.
Format the selected subtotals
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top