-
Thank you mdmckillop.
Thank you XLD, it works perfect, but I made a little changes, instead of xlDataField I used xlColumnField. But it gave me another error with the line:
.Function = xlSum
This is my modified code
[VBA]' Set up the data fields
With pt.PivotFields("Pieces Ordered")
.Orientation = xlColumnField
.Function = xlSum
.Position = 1
End With
With pt.PivotFields("Actual Sales")
.Orientation = xlColumnField
.Function = xlSum
.Position = 2
End With
With pt.PivotFields("Lost Sales")
.Orientation = xlColumnField
.Function = xlSum
.Position = 3
End With[/VBA]
Thanks again!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules