I need to get the value the "Division" from a row in a pivot table in VBA. There are 2 use cases:
1) If the division column is not displayed - i don't know if this is possible or not...
2) If the column IS displayed but it has that summarized view (i don't want to force the user into classic view), such as below where the "division" shows as headers and then a project field is underneath it. In this case there are two rows in the table for project 3, one would have division of "IT" and another would have division of "Digital". When going down the rows i would like the correct values for each row.
In the display i'm using for #2 above, here is what the table shows like:
The values in each row i would like to get would be IT (from summary row) , IT (fromproj 1 row), IT (from proj 2 row), IT (from proj 3 row)... Digital (from digital summary row), Digital (from the proj 3 row under digital) last two would be EIS...
Note: If i DID change to classic view (which i don't want to do), it shows the data like below. The division is there but just blank as it's not repeating
I am wondering if there is a way to use GETPIVOTDATA with field name "division" and refer to the row number you're on...
Thanks!
1) If the division column is not displayed - i don't know if this is possible or not...
2) If the column IS displayed but it has that summarized view (i don't want to force the user into classic view), such as below where the "division" shows as headers and then a project field is underneath it. In this case there are two rows in the table for project 3, one would have division of "IT" and another would have division of "Digital". When going down the rows i would like the correct values for each row.
In the display i'm using for #2 above, here is what the table shows like:
The values in each row i would like to get would be IT (from summary row) , IT (fromproj 1 row), IT (from proj 2 row), IT (from proj 3 row)... Digital (from digital summary row), Digital (from the proj 3 row under digital) last two would be EIS...
Note: If i DID change to classic view (which i don't want to do), it shows the data like below. The division is there but just blank as it's not repeating
I am wondering if there is a way to use GETPIVOTDATA with field name "division" and refer to the row number you're on...
Thanks!