Excel VisualBasic Script

Sub RedefinePivotTable()
         Dim pvt As PivotTable
         Set pvt = ActiveSheet.PivotTables(1)
         pvt.AddFields RowFields:=Array("Product", "Customer"), _
                      ColumnFields:="State", _
                      PageFields:="Date"
     End Sub