Updating pivot filters through VDA

misderexcel

New Member
Joined
Jan 17, 2013
Messages
2
Hey

Please help this is driving me insane.

So I want to update a pivot by using a cell reference and the preceding numbers.
For example the pivot is showing teams workload over the preceding 6 weeks, and I want to update the weeks as a report is created through VBA and relies on this.
So i want to update the filter "reporting week" this pivot which resides on the sheet called "pivots" but I want to update this to show the week numbers: which the number taken from "data sheet" cell b8 and the preceeding 5 numbers.
IE "data sheet" cell b8 contains this weeks number (38) and I want the filter to be set at 38, 37, 36, 35, 34 and 33, but next week "data sheet" cell b8 will show 39 and I will want to show 39, 38, 37, 36, 35, & 34.
Any help gratefully received.
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Watch MrExcel Video

Forum statistics

Threads
1,114,608
Messages
5,548,968
Members
410,886
Latest member
sjohn627
Top