+ Reply to Thread
Results 1 to 5 of 5

Update Pivot Report Filter Value based on cell updated by formula

  1. #1
    Registered User
    Join Date
    06-18-2010
    Location
    Canberra, Australia
    MS-Off Ver
    Excel 2010
    Posts
    29

    Update Pivot Report Filter Value based on cell updated by formula

    In short, I would like the value of a Pivot report filter on one sheet to be the same as the value in cell B2 on another sheet which changes depending on the value of a VLOOKUP formula in B2.

    I have been able to track down two different macros that do the job of updating the report filter value in a pivot table based on cell B2 updating.

    The problem is that neither macro works automatically. You have to physically run the macro to get the report filter to update. I would like the report filter of the pivot table to update each time the value resulting from the VLOOKUP changes.

    One of the macros that works, but fails to run automatically is below:

    Please Login or Register  to view this content.
    The other macro uses named ranges and goes something like:

    Please Login or Register  to view this content.
    Note that I have removed the named ranges from the file attached to avoid confusion, so this macro isn't working.

    Any help would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-18-2010
    Location
    Canberra, Australia
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Update Pivot Report Filter Value based on cell updated by formula

    Bump no response

  3. #3
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388

    Re: Update Pivot Report Filter Value based on cell updated by formula

    Try this macro, it runs automatically from the Worksheet_Change event on Sheet1 (Generator).
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-18-2010
    Location
    Canberra, Australia
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Update Pivot Report Filter Value based on cell updated by formula

    Many thanks for your help T-J. Unfortunately this code did not work for me. Not sure if you tried it in the attached spreadsheet.

    In the end I went for a combo box and attached the second macro in my first post to it. Had to redesign the worksheet as a resutl, but everything works now.

    Once again, many thanks.

    Cheers,
    Carl.

  5. #5
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388

    Re: Update Pivot Report Filter Value based on cell updated by formula

    Yes the code worked for me on your spreadsheet, so not sure why it failed for you.
    The code is placed in the worksheet code of Sheet1 (Generator).
    The code runs when an item from the data validation list in A2 is chosen which then updates the pivot report filter with the value in B2.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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