Pivot grand total

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.
 
R

rumkus

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top