ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Tables (https://www.excelbanter.com/excel-programming/319810-pivot-tables.html)

Arjan

Pivot Tables
 
L.S.

Since I'm using pivot tables daily, I lose a lot of time 'lay-outing' them.
Usually I have only one field in the data area, and two or three in the
column area. Is it possible - instead of doing all manual - to autosort all
columns by the data field (descending) and for the layout of the data to have
no decimals (the number format) and a 1000 separator? Since I can't find an
option to change the default layout, should this be done with a script? If
so, how should this look like?

Thanks! Arjan

David

Pivot Tables
 
Hi Arjan,
It is a little difficult to understand how your data is laid out on the
worksheet with your description. Maybe you could give us an example of the
data you re dealing with? It lmost sounds like there is only 1 row of data
that has only 2 or 3 elements, so is hard to think that a pivot table is even
necessary?

"Arjan" wrote:

L.S.

Since I'm using pivot tables daily, I lose a lot of time 'lay-outing' them.
Usually I have only one field in the data area, and two or three in the
column area. Is it possible - instead of doing all manual - to autosort all
columns by the data field (descending) and for the layout of the data to have
no decimals (the number format) and a 1000 separator? Since I can't find an
option to change the default layout, should this be done with a script? If
so, how should this look like?

Thanks! Arjan


Debra Dalgleish

Pivot Tables
 
You can change the number format of the data fields. For example:

Sub FormatDataFields()
On Error Resume Next
Dim pt As PivotTable
Dim pf As PivotField
Set pt = ActiveSheet.PivotTables(1)
For Each pf In pt.DataFields
pf.NumberFormat = "#,##0"
Next pf
End Sub


Arjan wrote:
L.S.

Since I'm using pivot tables daily, I lose a lot of time 'lay-outing' them.
Usually I have only one field in the data area, and two or three in the
column area. Is it possible - instead of doing all manual - to autosort all
columns by the data field (descending) and for the layout of the data to have
no decimals (the number format) and a 1000 separator? Since I can't find an
option to change the default layout, should this be done with a script? If
so, how should this look like?

Thanks! Arjan



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



All times are GMT +1. The time now is 11:53 AM.

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