Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A pivottable produces as an example:
Company Operation Cost thisone day 13.50 1. What syntax should I use to reference the value of 13.50? 2. When creating the pivottable how can I change this value to 0 yet leave the wsheet value unchanged? The pivottable code yields: Set pt = Sheets(5).PivotTables("PivotTable2") pt.Name '= PivotTable2 pt.RowFields(2).Name '= Company pt.RowFields(2).PivotItems(2).Name '= thisone pt.RowFields(1).Name '= Operation pt.RowFields(1).PivotItems(1).Name '= day pt. ???????????? '= 13:50 In the pivotfield code: With pt.PivotFields("Cost") .Value = 0 ' doesn't work .Orientation = xlDataField .Position = 1 .Function = xlSum .NumberFormat = "#,##0.00 " End With The wsheet values a pt.PivotFields(16).Name '= Company pt.PivotFields(32).Name '= Cost pt.PivotFields(32).PivotItems(1).Value '= 0.00 pt.PivotFields(32).PivotItems(2).Value '= 13.50 pt.PivotFields(32).PivotItems(3).Value '= 27.00 pt.PivotFields(32).PivotItems(4).Value '= 49.50 T.I.A. Geoff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PivotTable:Suppress rows with only 0 values | Excel Discussion (Misc queries) | |||
Percent of a value within all values, within a pivottable | Excel Discussion (Misc queries) | |||
Pivottable won't count blank values | Excel Discussion (Misc queries) | |||
Hide zero values in a PivotTable report | Excel Discussion (Misc queries) | |||
PivotTable Column Field Values | Excel Discussion (Misc queries) |