Hi Vicky,
you could try this code:
Code
-------------------
Sub pivot_count_columns()
'********Select the Pivot table*********
'using name of the pivot
'ActiveSheet.PivotTables("PivotTable4").PivotSelect PivotFields, xlDataAndLabel
'or using a known cell in the pivot
ActiveSheet.Range("q11").PivotTable.PivotSelect PivotFields, xlDataAndLabel
'if you want to count columns containing data only use xlDataOnly instead of xlDataAndLabel
'or if you want the number fo columns contining labels only use xlLabelOnly instead of xlDataAndLabel
'********Cont columns in selection**********
i = Selection.Columns.Count
'*********Check**********
MsgBox i
End Su
-------------------
Hope this helps
t