Archive of Mr Excel Message Board

Back to Pivot Tables in Excel archive index
Back to archive home

Center data in PIVOT table ?
Posted by Steven on December 11, 2001 7:55 PM
Hi,
Short question: is is possible to center data in a pivottable ? I have wide headings per column and my values are now aligned at the right hand side of the datafields (which is not very easy to read).
Or do I need VBA for to align the values in the datafield ?
Note that the column headings (!) can be aligned simply by using the center option in Excel. The data unfortunately are NOT centered with this option.
Thanks in advance
Steven

Re: Center data in PIVOT table ?
Posted by anno on December 11, 2001 8:43 PM
steven
select the pivot table areas you want to align, right click in the pivot table and select 'format cells' from the shortcut menu. select the 'alignment' tab which will show all alignment options, including vertical and horizontal.

Re: Center data in PIVOT table ?
Posted by Steven on December 11, 2001 9:11 PM
Anno,
Thanks for your (quick !)feedback and you're right it does work that way. I have tested with a new pivot table and it worked. The only weird thing is that the p-table I am using does not (?!) react on the "center" instruction (only the header is centered but not the data .....). Very strange. I might need to rebuild my table to get rid of this error (I suppose).
Thanks again
Steven

Re: Center data in PIVOT table ?
Posted by Chris D on December 12, 2001 5:59 AM
It could be that you have an option to refresh upon opening, which will always refresh the data...however, if you do not have the selection button depressed, it will renew the formatting each time, appearing to forget your centering
try right click on the pivot and choose "select" then choose "enable selection"..... this should preserve any formatting you carry out (ie centering) when you manually refresh or refresh upon opening the pivot table
HTH
Chris

Re: Center data in PIVOT table ?
Posted by Paul Johnson on December 12, 2001 6:20 AM
It could also be the number format chosen. If you selected the "," from the toolbar - it will align it right. Try changing the number format as well.

Re: Center data in PIVOT table ?
Posted by Steven on December 12, 2001 3:07 PM
Thanks guys, you were right, it had to do with the Enable Selection option. The table looks much better now !
Thanks
Steven

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.