Use VBA to update Pivot filter and record result

eca02jfl

New Member
Joined
May 12, 2011
Messages
1
I would like to ask some help for some code to update a pivot table filter and record the result.

I have a file with 3 sheets:

1) Database sheet
2) Pivot table
3) Output

My pivot table is based on the full dataset held in the 'Database' tab. The output sheet contains a record for each "Company" I am working with.

The Pivot table has a filter applied by "Company", additionally there are several calculations next to the Pivot which will update as the filter does to provide one overall result in cell K1283

What I want to do is:

1) Develop code that will automatically update the Pivot table filter by removing the relevant "Company" and leaving all others - this record is also held in column A of the 'Output' tab. THe record filtered out should correspond to this column and the relevant record

2) Equate result incell K1283 in the 'Pivot' sheet and record it in the corresponding 'Output' sheet in column i of the "Company" record. This will record the relevant Pivot-driven output in the appropriate "Company" row

Any help would be greatly appreciated!!
 

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,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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