PC Review


Reply
Thread Tools Rate Thread

Change Pivot Table Filter Based on Cell Value

 
 
New Member
Join Date: Sep 2010
Posts: 1
 
      22nd Sep 2010
Hi guys,

I have a problem with VBA I need to overcome.

OK, so, I have three Worksheets:

Data_Sheet – this contains a table of data with three columns; Date, Sales, Cost
Pivot_Sheet – this contains a pivot table of the data within the Data worksheet
Controls_Sheet – This contains a parameter which I would like to use to control the pivot table

What I would like to do is to change the date value in Controls_Sheet!B2, then run a macro, which would then filter all date values except the value within Controls_Sheet!B2.

So for example, if these are my dates within the ‘Dates’ column of my Pivot Table:

31/07/2010
07/08/2010
14/08/2010
21/08/2010
28/08/2010
04/09/2010

Then I set Controls_Sheet!B2 equals ‘04/09/2010’ then run the macro, only the line for ‘04/09/2010’ will be showing in the pivot table.

I have tried many codes all which seem not to work, so I haven’t posted them here. I have posted the example work sheet.

I’m sure this is simple buy I’m struggling with it. Thanks in advance.
Attached Files
File Type: zip pivot_test.zip (14.8 KB, 49 views)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter Table based on Cell Value Domenick Microsoft Excel Programming 1 26th Mar 2010 12:04 AM
Exclude data from Pivot Table based on filter? Eric Microsoft Excel Misc 3 27th Mar 2009 07:22 PM
Pivot Page field filter based on cell value michel.wielens@gmail.com Microsoft Excel Programming 6 11th Dec 2008 10:36 AM
Pivot Page field filter based on cell value michel.wielens@gmail.com Microsoft Excel Discussion 3 6th Dec 2008 03:12 AM
Re: Filter based on Pivot table Roger Govier Microsoft Excel Worksheet Functions 1 7th Dec 2005 12:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:44 AM.