Pivot grand total

March 06th, 2012 - 09:12 am ET by rumkus | Report spam
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.
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 rumkus
March 06th, 2012 - 01:56 pm ET | Report spam
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

Thank you very much Dana !

Similar topics