Info

Set PT = WSD.PivotTableWizard(SourceType:=xlDatabase, _ SourceData:=PRange.Address, _

TableDestination:="R2C10", TableName:="PivotTable1")

PT.ManualUpdate = True 1 Set up the row fields

PT.AddFields RowFields:="Region", ColumnFields:="Product"

' Set up the data fields With PT.PivotFields("Revenue") .Orientation = xlDataField .Function = xlSum .Position = 1 .NumberFormat = "#,##0,K" .Name = "Total Revenue" End With

PT.ManualUpdate = False PT.ManualUpdate = True

End Sub

0 0

Post a comment