ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PivotTable: AddDataField method (https://www.excelbanter.com/excel-programming/271791-pivottable-adddatafield-method.html)

Tony G

PivotTable: AddDataField method
 
Hello World!
I'm using the AddDatfield method to add the data field
into a pivottable as part of a custom pivot builder. It
takes it's values from a simple interface. Here's the
gubbins;

(With MyPivottable etc.etc..)

..AddDataField .PivotFields(frmMain.L24.Caption), Plbl,
xlCount

(Plbl=descriptive string of label)
(frmMain.L24.Caption=selected field string)

The problem is that when the user elects to have one of
the selected row or column fields to also use as the data
field, the resulting table has that row/column field
removed from where it was and used as data but not split
out by it's values along the the row or column (phew! hope
that makes sense).

I have a feeling that I should be setting the field
orientation but can I do it for the same field twice?

Any help appreciated.




All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com