Pivot grand total

  • Thread starter Thread starter rumkus
  • Start date Start date
R

rumkus

My data field on pivot as "Max of sale" so Grand Totals also as "Max of sale" for both columns and rows. How nice it'd be if my Grand Totals could show "Sum of sale" summing all "Max of sale"s. Is that ever possible ?
Or how can i sum these "Max of sale" values ?
Thank you in advance.
 
Dana DeLouis 12.01.99
----------------
For columns:

Dim r As Long
With ActiveSheet.UsedRange
r = .Rows.Count
.Rows(1).Offset(r, 0).FormulaR1C1 = _
WorksheetFunction.Substitute("=SUM(R[-r_]C:R[-1]C)", "r_", r)
End With

For Rows:

Dim r As Long
With ActiveSheet.UsedRange
r = .Columns.Count
.Columns(1).Offset(, r).FormulaR1C1 = _
WorksheetFunction.Substitute("=SUM(RC[-r_]:RC[-1])", "r_", r)
End With
 
Back
Top