Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 371
Default Pivottable references and values

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PivotTable:Suppress rows with only 0 values Donari Excel Discussion (Misc queries) 1 August 12th 08 11:55 PM
Percent of a value within all values, within a pivottable Mark Parent Excel Discussion (Misc queries) 8 June 20th 08 07:34 AM
Pivottable won't count blank values Eric Excel Discussion (Misc queries) 6 February 10th 07 11:10 PM
Hide zero values in a PivotTable report KC Excel Discussion (Misc queries) 1 September 25th 06 09:32 PM
PivotTable Column Field Values Michael Rekas Excel Discussion (Misc queries) 2 December 10th 04 02:18 PM


All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"