PDA

View Full Version : Sleeper: How to delete the 'grand total value' in a pivot table?



frade
05-12-2005, 08:08 AM
Hi,

I have created a table pivot from my results. It's OK but I
would like disappear the 'grand total value' (sum) for each row
(for each day in my example).
I will keep the 'grand total value' (sum) for each column
(for each dilution in my example)

What can I do?

Thanks !

Fran?ois



Public Sub REPEATABILITY()
Dim myPivot As PivotTable
Dim myField As PivotField
On Error Resume Next
Application.DisplayAlerts = False
Sheets("TP_REPEATABILITY").Delete
Application.DisplayAlerts = True
Range("A1").Select
On Error GoTo 0
Set myPivot = Sheets("REPEATABILITY").PivotTableWizard
Set myField = myPivot.PivotFields("RESULTS")
With myField
.Orientation = xlDataField
.Function = xlAverage
End With
Set myField = myPivot.PivotFields("DAY")
myField.Orientation = xlRowField
Set myField = myPivot.PivotFields("NUMBER OF DILUTIONS")
myField.Orientation = xlColumnField
Application.CommandBars("PivotTable").Visible = False
ActiveSheet.Name = "TP_REPEATABILITY"
End Sub

mvidas
05-12-2005, 12:26 PM
Hi Fran?ois,

Give the following a try:


mypivot.PivotFields("DAY").Subtotals(1) = False

If not, can you post a sample workbook?
Matt