+ Reply to Thread
Results 1 to 4 of 4

VBA: Filter Pivot Table based on cell values

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    Lund
    MS-Off Ver
    Excel 2003
    Posts
    9

    VBA: Filter Pivot Table based on cell values

    Hello,

    I'm having some trouble filtering Row Labels based on cell values since I am not able to use .CurrentPage since this seems to only apply for Report Filter. I have three fields in Row Labels and just one field in Values, basically I want to be able to filter the pivot table from another sheet depending on three different cell values.

    Reason why I dont have the fields in Report Filter but in Row Labels is that I still want to see all the rows in the pivot, not only the total sum (to be able to create charts later on or automatically).

    Would very much appreciate your help on this one since I havent found any solution on this forum and google.

    Br,
    Nicklas

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: VBA: Filter Pivot Table based on cell values

    Hi Nicklas,

    Could you upload a sample workbook without any sensitive data and explain expected result? Would be easier for us to work with

    Mvh,
    Johan

  3. #3
    Registered User
    Join Date
    09-10-2012
    Location
    Lund
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: VBA: Filter Pivot Table based on cell values

    Sure! Find enclosed the example. I'm trying to figure out if it's possible to Filter as single selection from the yellow marked cells, with the fields still as RowLabels and not in Report Filter.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: VBA: Filter Pivot Table based on cell values

    One way is to use a worksheet change event to be triggered when either cell S2 or V2 changes.

    Put this in the Sheet1 module (and see attached):
    Please Login or Register  to view this content.
    See how that works for you.
    Attached Files Attached Files
    Last edited by berlan; 08-31-2015 at 11:20 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 07-31-2014, 12:56 PM
  2. Replies: 8
    Last Post: 06-24-2014, 03:35 PM
  3. [SOLVED] filter a pivot table based a cell
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2014, 10:50 AM
  4. [SOLVED] Filter Pivot Table Based on Cell Value
    By cp41 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2013, 07:24 AM
  5. Filter A Pivot Table Multiple Times Based On Values In List In Another Sheet
    By w.m.christensen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2013, 03:55 AM
  6. Change pivot table filter with VBA based on cell values
    By ZeDoctor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 09:03 AM
  7. Change Pivot table Filter Based on Cell Value *Multiple Filter items* Possible?
    By Flydd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2012, 06:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1