Question regarding a Macro that creates pivot table using Data Model option

RJWIS

New Member
Joined
Dec 12, 2018
Messages
1
My background:
I am a strong user of Excel, but not experienced in VBA code. I am proficient in "Recording Macros"

I have a 25,000 row set of data which is replaced each month with new data, but has an identical column structure and formats.
I have several macros built which then cleanse the data
I then use Macros to create 3 pivot tables which summarize the data.
One of these pivot tables requires a Distinct Count, which I get my using the "Add this data to the Data Model" Pivot Table Option.

Everything works fine, until I save the file with a new name and in a new folder.
When I do that, the macro that creates the Distinct Count references the data in the old folder.

Any ideas on how to fix this?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,223,888
Messages
6,175,206
Members
452,618
Latest member
Tam84

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