G
Guest
Hello, I'm having a problem with Excel forcing "Sum of " in front of the
Caption I'm assigning to my Datafields in a Pivot Table. Please see code
below. In this case Excel takes my Caption "Backlog Coverage, Rev (K$)" and
turns it into "Sum of Backlog Coverage, Rev (K$)" on the report. On the
report I don't want the users to see that "Sum of ." Thanks in advance for
any help you can provide.
Best Regards,
Dean
CODE EXCERPT
Set ptDashPORTPivot = Worksheets("DashPORT").PivotTables("DashPORTPivot")
strDatafieldCaption = "Backlog Coverage, Rev (K$)"
strDatafieldFormula = "(BillGrossR + BLCSDR)/1000"
strNumberFormat = "#,###;-#,###;"
ptDashPORTPivot.CalculatedFields.Add strDatafieldCaption,
strDatafieldFormula, True
With ptDashPORTPivot.PivotFields(strDatafieldCaption)
.Orientation = xlDataField
.NumberFormat = strNumberFormat
End With
Caption I'm assigning to my Datafields in a Pivot Table. Please see code
below. In this case Excel takes my Caption "Backlog Coverage, Rev (K$)" and
turns it into "Sum of Backlog Coverage, Rev (K$)" on the report. On the
report I don't want the users to see that "Sum of ." Thanks in advance for
any help you can provide.
Best Regards,
Dean
CODE EXCERPT
Set ptDashPORTPivot = Worksheets("DashPORT").PivotTables("DashPORTPivot")
strDatafieldCaption = "Backlog Coverage, Rev (K$)"
strDatafieldFormula = "(BillGrossR + BLCSDR)/1000"
strNumberFormat = "#,###;-#,###;"
ptDashPORTPivot.CalculatedFields.Add strDatafieldCaption,
strDatafieldFormula, True
With ptDashPORTPivot.PivotFields(strDatafieldCaption)
.Orientation = xlDataField
.NumberFormat = strNumberFormat
End With