I can't help very much because I don't understand what you want. I haven't tried running the code, but you imply that it isn't giving you what you want and I don't understand what it is you DO want. I have spent some time looking at the data given at the top and the desired output at the end and I haven't a clue how the one is supposed to map to the other. Some of the questions I have are:
Are users other than root supposed to be ignored?
If not, where did the data go to?
If so, where did the data come from?
Where did "Aantal" come from?
Your answer may be to use data tables instead of pivot tables. This is a little known technique that goes back to Lotus 1a for DOS and possibly further. If you are doing anything like what I think, my pseudocode would be as follows:
Import the CSV Extract the unique users and dates using the database functions Calculate the lowest and highest dates Paste the users to the destination (leftmost output) column Assign all dates from lowest to highest to the destination (uppermost +output) row Enter the DSUM formula in the top left output cell Create a data table including an extra row and column Label the extra row & column "Total"
Now, there are all sorts of powerful tricks you can perform using named ranges to deal with changing data, but I would advise you to get a simple version working first.
Regards,
John Davies
In reply to Re: win32::ole pivot sort descending
by davies
in thread win32::ole pivot sort descending
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |