Pivot Tables and Cells.Find
Here is one:
Sub CheckDataField(collabel As String)
Set pvtTable = ActiveChart.PivotLayout.PivotTable
For Each pvtField In pvtTable.DataFields
If Left(pvtField.Name, 5) = "Count" Then
With ActiveChart.PivotLayout.PivotTable.PivotFields("Co unt of Value")
.Caption = collabel
.Function = xlSum
End With
End If
If Left(pvtField.Name, 3) = "Sum" Then
With ActiveChart.PivotLayout.PivotTable.PivotFields("Su m of Value")
.Caption = collabel
End With
End If
Next pvtField
End Sub
---------------------------------------------------------------
if you need to check individual values for any of the Pivot field, then use
the
pivotitem object.
Good Luck
Kanan
" wrote:
No I haven't...do you have an example of the PivotField object?
|