+ Reply to Thread
Results 1 to 2 of 2

Macro to Select Blank or latest year on Pivot Filter

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,709

    Macro to Select Blank or latest year on Pivot Filter

    I have a Pivot table on Sheet "Purchases" and would like macro to select the "Blank" from filter drop down in A2 if Cell C10 on sheet "Recon" is zero, otherwise select highest year from Filter


    I have attached sample data




    It would be appreciated if someone could assist me

    I have also posted on https://www.mrexcel.com/forum/excel-...sed-value.html

    See my code below which I cannot get to work as per my criteria

    If C10 on sheet 'Recon" is zero then filter must be "Blank", otherwise select Highest Year in filter , based on max year on "Raw Data"

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Pepe Le Mokko; 11-14-2019 at 03:25 AM. Reason: Highlighted link

  2. #2
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,709

    Re: Macro to Select Blank or latest year on Pivot Filter

    I have managed to resolved my query. I set up an extra sheet called "filtered data" and used advanced filtering with criteria to extract the data and linked this to my Pivot Table and once refreshed the Pivot filter filters by the criteria

+ 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] Select Automatic Report Filter in Pivot where Filter exist in Data table else select Blank
    By vinaynaran in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-02-2016, 08:47 AM
  2. VBA- Filter Pivot table based on latest and 2nd latest date in column
    By ziyan89 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 12-29-2015, 11:18 AM
  3. Macro to select rolling/latest 6 weeks in a pivot table
    By prasannakr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2013, 03:59 AM
  4. Replies: 5
    Last Post: 05-29-2013, 12:27 AM
  5. Replies: 2
    Last Post: 02-13-2012, 08:51 PM
  6. Select latest of 3 dates and skip blank cells
    By Skully in forum Excel General
    Replies: 16
    Last Post: 06-08-2011, 04:07 AM
  7. Macro to select first blank cell in filter for vlookup
    By prashant84 in forum Excel General
    Replies: 1
    Last Post: 08-22-2010, 02:12 PM

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