Pivot Table range when new columns are added to source

keiranwyllie

New Member
Joined
May 12, 2017
Messages
47
Hi everyone,

My question relates to dynamically expanding the range on a pivot table when new columns are added as part of a separate pice of code, then adjusting the range of a chart to now exclude a previous column, and include one of the new columns (containing a copy of the previous data that will be updated).

So to expand on this, I have a table I've created a pivot table from. It only reports on two columns from that range, the first (contains a list of titles), and the last (contains a status based on a list of 5 items - Implemented, Not Implemented, Not Applicable etc) - let's call it "Implementation Status". I've also created a chart from this data (I'll assume the type of charge is not relevant here).

When I run a script, I add 4 new columns to the end of the original range with the first new column being a copy of the original "Implementation Status" column which can then be updated. Once updated, another piece of code is run to refresh workbook data and update the main dashboard. I want to be able to now capture the new status column, now called "New Implementation Status" to capture the changes on the chart.

Any ideas on how to go about this one please?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,223,250
Messages
6,171,036
Members
452,374
Latest member
keccles

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