Microsoft Office Tutorials and References
In Depth Information
Figure 20-42. Illustrating a calculated item (CompanyX2)
Add "CompanyX2", "='Store Type'Company*2"
The results are shown in Figure 20-42 , where the calculated item is CompanyX2. The value in
each of the CompanyX2 cells is twice the value in the corresponding Company cell.
Figure 20-42. Illustrating a calculated item (CompanyX2)
For comparison, let us add a calculated field to the pivot table in Figure 20-42 . We will add the
same calculated field that we added when we discussed the CalculatedFields method earlier in the
With ActiveSheet.PivotTables("Sales&Trans"). _
CalculatedFields.Add("Average", _
"= Sales/Transactions")
.Orientation = xlDataField
.Name = "Avg Check"
.NumberFormat = "##.#"
End With
The result is shown in Figure 20-43 .
Figure 20-43. Illustrating a calculated field and calculated item
Search JabSto ::

Custom Search