Sub test()
Dim tcd As PivotTable
Dim pft As PivotField
Dim goon As Boolean
goon = True
For Each tcd In ActiveSheet.PivotTables
If Not (Intersect(tcd.DataBodyRange, ActiveCell) Is Nothing) And goon = True Then
For Each ptf In tcd.VisibleFields
If Not (Intersect(ptf.DataRange, ActiveCell) Is Nothing) Then
ptf.NumberFormat = "#,##0"
goon = False
Exit For
End If
Next ptf
End If
Next tcd
End Sub