Hope no one minds, I recreated this post with a better title, since I was getting no responses.
I need to quickly change which field is listed in the Values area of a pivot table. My current method is to drag the field out of the values area, drag the new field into the values area, right click it, and select average.
I would really like to write a <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 0, 0); cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">VBA</acronym> script to handle this for me based on a value in a cell (that has a drop down list populated from the header of my data). BUT, I cannot seem to find a way to determine WHICH field is currently in the values area before deleting it from the pivot table. All of the tutorials (and microsoft reference) show how to remove a field from a pivot chart, but only if you know which field is already there. I suppose I could remove everything, then add it all back, but I think that's a rabbit hold I'm not prepared for.
Any suggestions?
Thanks.
I need to quickly change which field is listed in the Values area of a pivot table. My current method is to drag the field out of the values area, drag the new field into the values area, right click it, and select average.
I would really like to write a <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 0, 0); cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">VBA</acronym> script to handle this for me based on a value in a cell (that has a drop down list populated from the header of my data). BUT, I cannot seem to find a way to determine WHICH field is currently in the values area before deleting it from the pivot table. All of the tutorials (and microsoft reference) show how to remove a field from a pivot chart, but only if you know which field is already there. I suppose I could remove everything, then add it all back, but I think that's a rabbit hold I'm not prepared for.
Any suggestions?
Thanks.