I am trying to determine if a calculated field is in a pivot table or not. "TC %" is a field that is available for the table but even when it isn't included, the if statement below triggers as true (launching msgbox). I assume it is because it sees TC % as an available field vs what is actually in the table. How do I adjust it to look in the table? Thanks!
Rich (BB code):
Dim pt As PivotTable
Dim pf As PivotField
Set pt = ActiveSheet.PivotTables(1)
Dim pi As PivotItem
For Each pf In pt.PivotFields
If pf.Name = "TC %" Then
MsgBox "found field name"
Last edited by a moderator: