dancing-shadow
New Member
- Joined
- Dec 4, 2011
- Messages
- 24
Morning - hoping this is a quick and easy fix!
I have an option button on the same sheet as a pivot table. The pivot table has two similar calculated fields currently
Within SLA % = 'Within SLA' / Projects
Outside SLA % = 'Outside SLA' / Projects
What I want is to toggle both calculated formula between /Projects and /Jobs by clicking the option button.
The code I currently have is not working:
Am I going about this the right way or is there a better option?
TIA
I have an option button on the same sheet as a pivot table. The pivot table has two similar calculated fields currently
Within SLA % = 'Within SLA' / Projects
Outside SLA % = 'Outside SLA' / Projects
What I want is to toggle both calculated formula between /Projects and /Jobs by clicking the option button.
The code I currently have is not working:
Code:
With ActiveSheet.PivotTables("PivotTable5")
.CalculatedFields("Within SLA %").StandardFormula = "='Within SLA'/Jobs"
.CalculatedFields("Outside SLA %").StandardFormula = "='Outside SLA'/Jobs"
End With
Am I going about this the right way or is there a better option?
TIA