Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function PivotFieldSouceName(PvtFieldName As Range)
'SkipVought 2008/11/12
Dim pvt As PivotTable, PvtTableNbr As Integer
'first find the PivotTable
PvtTableNbr = 1
For Each pvt In ActiveSheet.PivotTables
If Not Intersect(pvt.TableRange1, PvtFieldName) Is Nothing Then Exit For
PvtTableNbr = PvtTableNbr + 1
Next
'return the value
PivotFieldSouceName = ActiveSheet.PivotTables(PvtTableNbr).PivotFields(PvtFieldName.Value).SourceName
End Function