With this Macro, I need the "Σ Values" to be in the Column Label, but I can't figure out how to move it.
Private Sub CommandButton1_Click()
Sheets("Pivot").Cells.EntireColumn.Delete
ActiveSheet.Range("A1").Select
Set objtable = ActiveSheet.PivotTableWizard(TableName:="PT1", TableDestination:=Sheets("Pivot").Cells(2, FinalCol + 2))
With Sheets("Pivot").PivotTables("PT1")
With Sheets("Pivot").PivotTables("PT1").PivotFields("BalAmt")
.Orientation = xlDataField
.Function = xlSum
.NumberFormat = "$ #,##0"
.Position = 1
End With
With Sheets("Pivot").PivotTables("PT1").PivotFields("BalAmt")
.Orientation = xlDataField
.Function = xlSum
.NumberFormat = "$ #,##0"
.Position = 2
End With
With Sheets("Pivot").PivotTables("PT1")
.AddDataField ActiveSheet.PivotTables("PT1").PivotFields("BalAmt")
End With
With Sheets("Pivot").PivotTables("PT1").PivotFields("Rcv Owner")
.Orientation = xlRowField
End With
End With
End Sub
Bookmarks