Welcome to board !
Post your code.
Welcome to board !
Post your code.
Cheers !
Excel Range to BBCode Table
Use Social Networking Tools If You Like the Answers !
Message to Cross Posters
@ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDa tabase, SourceData:= _
"Sheet1!R1C1:R19C12", Version:=xlPivotTableVersion12).CreatePivotTable _
TableDestination:="Sheet4!R3C1", TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion12
Sheets("Sheet4").Select
Cells(3, 1).Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Region")
.Orientation = xlRowField
.Position = 1
End With
ActiveSheet.PivotTables("PivotTable1").AddDataFiel d ActiveSheet.PivotTables( _
"PivotTable1").PivotFields("Sum of Feb usd @1.3881 "), _
"Count of Sum of Feb usd @1.3881 ", xlCount
With ActiveSheet.PivotTables("PivotTable1").PivotFields ( _
"Count of Sum of Feb usd @1.3881 ")
.Caption = "Sum of Sum of Feb usd @1.3881 "
.Function = xlSum
End With
End Sub
the header "sum of feb usd @1.3881 can change
Bookmarks