I'm trying to make a pivot table with a few filters, and make it look the way it looks when people do it manually, but the appearance is completely different. I recorded a macro when inserting the filter fields, and the VBA code is precisely the same, but the look of the result is completely different. I'm sure there must be some layout/design thing that is a default but when I look at every property I'm aware of for a new pivot table, including table design, none of them give me my desired result. Please see the attached screen shots. One is named "ManualPivot" (this is where fields are dragged from pivot table list down to the Filters box) and MacroPivot (this is when adding the fields via VBA code, shown below. This code is also identical to what's created when recording a macro dragging the fields into Filters box of pivot table design).
How in VBA can I duplicate the appearance of the manually added filter fields?
Thanks for any help
VBA Code:
With PTable2.PivotFields("Sell Date")
.Orientation = xlPageField
.Position = 1
End With
With PTable2.PivotFields("Cust Descrip")
.Orientation = xlPageField
.Position = 2
End With
With PTable2.PivotFields("Fulfilled YN")
.Orientation = xlPageField
.Position = 3
End With
How in VBA can I duplicate the appearance of the manually added filter fields?
Thanks for any help