+ Reply to Thread
Results 1 to 2 of 2

Controling Pivot table filter through formula bar

  1. #1
    Registered User
    Join Date
    10-13-2019
    Location
    Belgium
    MS-Off Ver
    MS Office 365
    Posts
    1

    Question Controling Pivot table filter through formula bar

    Beautifull ! Just what I needed, but couldn't find.
    Thanks a lot !

    I have a sheet 'table' with X projects (in this example 15), all with a unique name, collected in a table named ‘Projectdata’. (for this example an extreme simplification of the real data table I use)
    I have a second sheet 'pivot table' with a pivot table connected to table ‘Projectdata’, with a filter on the column ‘project’ and an output of the data from phase 1,2 and 3. I have added a Slicer named ‘projectname’ to control the filter.
    My question:
    Is it possible to write a macro in Excel that:
    1.) Selects a predetermined cell from sheet ‘table’(for example cell B3 in table ‘Projectdata’ ; value= 2PK002)
    2.) Copies the text from the formula bar ! (NOT from the cell itself).
    3.) Selects a predetermined cell that controls a filter for a pivot table (in example cell B1 in sheet ‘pivot table’)
    4.) Pastes the value into the formula bar! (NOT into the cell, because that doesn’t work), thereby changing the filter from the pivot table.

    Because this works when you do it manually, I suppose it is doable by macro, but when recording my actions it doesn’t really translate into a macro. My knowledge of writing macro’s is limited and I am at a loss.

    Btw…My main goal is to be able to paste the text value from column B in table ‘Projectdata’, when preceded by an ‘x’ in column ‘print’, paste that value into the cell that controls the filter for the pivoting table, Then make a pdf export from the pivotable with my pdfprinter, go on to the next value from column B in the table ‘Projectdata’ precede by an x in column ‘print’ till I have exports for all the marked projects. Then I can go into the printer dialog box and merge all pdf’s into a multisheet pdf document.

    Thanks in advance !
    LennertN
    Attached Files Attached Files
    Last edited by LennertN; 10-26-2019 at 07:16 AM. Reason: solved

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Contorling Pivot table filter through formula bar

    Click on a cell in column B. Then click on the 'pivot table' tab. The pivot table is now filtered by the value in the selected cell.
    Attached Files Attached Files

+ 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. [SOLVED] Can I use a formula to filter labels in a pivot table?
    By marketshare in forum Excel General
    Replies: 0
    Last Post: 08-09-2019, 04:32 AM
  2. Replies: 1
    Last Post: 02-25-2018, 09:47 PM
  3. Two pivot tables with the filter of pivot table 2 to automatically update to filter 1
    By StefaniaLa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2018, 06:19 PM
  4. Replies: 6
    Last Post: 07-31-2014, 12:56 PM
  5. [SOLVED] Pivot table - formula/format to filter by month and year
    By HeyInKy in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-17-2014, 01:54 PM
  6. Pivot table, assigning a cell wo be change the Pivot table filter
    By jwongsf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2012, 05:00 PM
  7. Pivot Table Filter by Formula Result
    By WAW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2010, 06:45 AM

Tags for this Thread

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