Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a statement below with "PivotTable5" - How do I make that a generic
pivot table to where it would work with any pivot highlighted? With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Sum of Duration") .Calculation = xlPercentOfColumn .NumberFormat = "0%" -- Sue |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Sue
Try With ActiveSheet.PivotTables(1).PivotFields("Sum of Duration") _ .Calculation = xlPercentOfColumn .NumberFormat = "0%" End With Assuming there is only 1 pivot table on the active sheet -- Regards Roger Govier "Sue" wrote in message ... I have a statement below with "PivotTable5" - How do I make that a generic pivot table to where it would work with any pivot highlighted? With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Sum of Duration") .Calculation = xlPercentOfColumn .NumberFormat = "0%" -- Sue |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Roger,
I have two pivots on the active sheet. I want to highlight the pivot value area and then change the format. Is there any way to make the selected pivot (generic - any active pivotTable) the only one I will change the format?-- Sue "Roger Govier" wrote: Hi Sue Try With ActiveSheet.PivotTables(1).PivotFields("Sum of Duration") _ .Calculation = xlPercentOfColumn .NumberFormat = "0%" End With Assuming there is only 1 pivot table on the active sheet -- Regards Roger Govier "Sue" wrote in message ... I have a statement below with "PivotTable5" - How do I make that a generic pivot table to where it would work with any pivot highlighted? With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Sum of Duration") .Calculation = xlPercentOfColumn .NumberFormat = "0%" -- Sue |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Sue
The following appears to work fine for me when I select a cell within the PT first Dim myname As String With ActiveSheet myname = ActiveCell.PivotTable() End With With ActiveSheet.PivotTables(myname).PivotFields("Sum of Duration") _ .Calculation = xlPercentOfColumn .NumberFormat = "0%" End With -- Regards Roger Govier "Sue" wrote in message ... Roger, I have two pivots on the active sheet. I want to highlight the pivot value area and then change the format. Is there any way to make the selected pivot (generic - any active pivotTable) the only one I will change the format?-- Sue "Roger Govier" wrote: Hi Sue Try With ActiveSheet.PivotTables(1).PivotFields("Sum of Duration") _ .Calculation = xlPercentOfColumn .NumberFormat = "0%" End With Assuming there is only 1 pivot table on the active sheet -- Regards Roger Govier "Sue" wrote in message ... I have a statement below with "PivotTable5" - How do I make that a generic pivot table to where it would work with any pivot highlighted? With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Sum of Duration") .Calculation = xlPercentOfColumn .NumberFormat = "0%" -- Sue |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to create pivot table from existing pivot table in excel 2007 | Excel Discussion (Misc queries) | |||
Change a specific code to generic in VB macro | Excel Discussion (Misc queries) | |||
Does table have at least one row in Excel 2007? | Excel Discussion (Misc queries) | |||
Pivot Table in Excel 2007 : Problem with % in Table | Excel Discussion (Misc queries) | |||
Creation of a Generic Macro | Excel Worksheet Functions |