I have code that creates a pivot table and it works fine. However I want to make it dynamic, by using the value in B1. ANy ideas on how to update this portion of the code?
Code:
With pvt
.PivotFields("Color").Orientation = xlPageField
With pvt.PivotFields("Color")
On Error Resume Next
.PivotItems = .Range("B1")
On Error GoTo 0
End With
End With
Last edited: