Pivot Table with Dynamic Headers

HURTMYPONY

Board Regular
Joined
Oct 27, 2003
Messages
166
This one is a little different than other similar topics.

I have a pivot that bases its data on a fixed number of columns (37).

The problem with the source data is that the column headers, which are values on the pivot, often change their names.

For example, Column W may be named "Sprocket" on one day, it might be changed to "Gear" the next. The number of columns remain the same, but the column headers change.

The pivot does not account for these changes. As soon as the column header changes its name, it removes that column after a refresh (i.e. unchecks that column in the Pivot Field List and that column no longer shows up on the generated pivot).

Is there a way, either in options or by VBA, to get the pivot to include these columns automatically after they change their header name? I tried making a dynamic pivot with OFFSET and a named range, and while it included the newly named column in the Pivot Field List, it does not automatically display the newly named column in the pivot after a refresh.

I fear my end users are not savvy enough to open the Pivot Field List and check the box.

Any solution for this? Thank you very much!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Doh, I was really expecting this to be one of the easier solutions.

There's really no way to make columns with newly-changed headers appear automatically on an existing pivot table?
 
Upvote 0
Do you have to have the headers change? Would it be an option to use a row above the headers to indicate the current header info and leave the actual headers for the pivot dat the same? You could then use formulas in a row above the pivot to display the correct captions.
If not, you'll need code to add all the new data fields back in.
 
Upvote 0
Do you have to have the headers change? Would it be an option to use a row above the headers to indicate the current header info and leave the actual headers for the pivot dat the same? You could then use formulas in a row above the pivot to display the correct captions.
If not, you'll need code to add all the new data fields back in.

Thanks for the reply!

That's a great "outside the box" solution that could probably work! Fantastically simple, since the columns never change in number or change in order.

I just have to see if hiding a header on the source data messes with any of the other macro processes, named ranges and dynamic content.

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,308
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top