Hello All,
Sorry if this is an elementary question - I'm fairly new to both pivot tables and developing macros.
Right now I have a pivot table that summarizes data for 3 differences categories (Shift, Tool, & Operator). The data is a summary of activities done during a week and presented in days.
However, for the final presentation of data I need to convert the times into hours. So i created a table below and used the formula (=Xcell*24), which gave me a nice presentation of all the information converted into hours.
However, this file must be updated and a new table refreshed with the updated information. The problem I have is that it doesn't update my secondary table as well. So i tried creating a macro that will deactivate any unnecessary row labels and update the information.
This would essentialy boil down to IF(pivotTalble Row Label ("Tool") = true, ActiveSheet.PivotTables("PivotTable1").PivotFields("tool").Orientation = _xlHidden)
However:
1) I'm not sure what the syntax is to the "Row Label". I thought maybe this:
ActiveSheet.PivotTables("PivotTable1").PivotFields("Tool")=true ... but that didn't work. So could someone tell me what the actual designation is to refer to a row label in a pivot table?
2) It says the format of the if statement is wrong and that there should be a ")" after the true, which I don't believe follows the IF statement structure.
Could anyone PLEASE help, ive been working on this for 2 days and getting now where. I'll be more than happy to provide more information if you need.
Thank you,
- J
Bookmarks