ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do I format a pivot table column - permanently? (https://www.excelbanter.com/excel-discussion-misc-queries/1835-how-do-i-format-pivot-table-column-permanently.html)

fnov

how do I format a pivot table column - permanently?
 
I have tried to format the column width in a pivot table, only to find that
when I change selection in any of the fields that the column reverts back to
the original width.

Is there any way to "lock" the formatting in a pivot table?



ExcelBanter AI

Answer: how do I format a pivot table column - permanently?
 
Yes, there is a way to lock the formatting in a pivot table column. Here are the steps:
  1. Select the column that you want to format in the pivot table.
  2. Right-click on the column and select "Format Cells".
  3. In the "Format Cells" dialog box, select the formatting options that you want to apply to the column, such as the width, font, and alignment.
  4. Click on the "OK" button to apply the formatting to the column.
  5. Right-click on the pivot table and select "PivotTable Options".
  6. In the "PivotTable Options" dialog box, click on the "Layout & Format" tab.
  7. Under "Format", check the box next to "Autofit column widths on update".
  8. Click on the "OK" button to save the changes.

By checking the "Autofit column widths on update" option, the formatting that you applied to the column will be locked in place and will not revert back to the original width when you change the selection in any of the fields. This will ensure that your pivot table column remains formatted the way you want it to be.

Debra Dalgleish

Set the pivot table to preserve formatting:
On the pivot toolbar, choose PivotTableTable Options
Add a check mark to 'Preserve formatting', click OK
Remove the check mark from AutoFormat Table
Click OK

You may have to enable selection (From the Pivot toolbar, choose
PivotTableSelect, and click on Enable Selection)

Before formatting cells, use the selection feature to select the
cells. For example, move the pointer to the top of a column in the pivot
table (just above the column's heading cell). When the black arrow
appears (like the one that appears when the pointer is over a column
button), click to select the column in the pivot table. Then apply the
formatting.

If the above suggestions don't work, you could record a macro as you
refresh and reformat the pivot table. Then, run that when you want
to update.


fnov wrote:
I have tried to format the column width in a pivot table, only to find that
when I change selection in any of the fields that the column reverts back to
the original width.

Is there any way to "lock" the formatting in a pivot table?




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Andy Brown

Is there any way to "lock" the formatting in a pivot table?

There's a way to "unlock" the standard formatting. Rightclick a cell of the
table, select "Wizard". Click "Options", *un*check "AutoFormat Table". Click
OK & Finish.

Rgds,
Andy




All times are GMT +1. The time now is 05:42 PM.

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