Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By frank_AL

Change PivotTables and Formula resultes depending on Filtered Rows on Main Worksheet

This is a discussion on Change PivotTables and Formula resultes depending on Filtered Rows on Main Worksheet within the Excel Questions forums, part of the Question Forums category; I have set my main worksheet to Format as Table. I have two formulas referencing a column containing dates. Code: ...

  1. #1
    Board Regular
    Join Date
    Sep 2008
    Posts
    238

    Default Change PivotTables and Formula resultes depending on Filtered Rows on Main Worksheet

    I have set my main worksheet to Format as Table. I have two formulas referencing a column containing dates.

    Code:
    =MIN(Sheet1B:B)
    Code:
    =MAX(Sheet1B:B)
    I would like these to change to correlate with the data I have filtered on my main worksheet table, but it still reads all data even after a filter.

    On the same lines my PivotTable is setup to use the main worksheet table, and would like it to change it as well depending on the main worksheet filters.

  2. #2
    Board Regular
    Join Date
    Oct 2015
    Location
    Mc Calla, AL
    Posts
    126

    Default Re: Change PivotTables and Formula resultes depending on Filtered Rows on Main Worksheet

    Excel's SUBTOTAL Function can get you the result you are looking for.

    For MAX: =SUBTOTAL(104, Sheet1B:B)
    For MIN:
    =SUBTOTAL(105, Sheet1B:B)

    Check out this link for more information on the SUBTOTAL Function. You will see that there are many calculations that can be performed and you can either calculate on all cells in a range or ignore hidden cells which is what the 104/105 does for you.
    geospatial likes this.

  3. #3
    Board Regular
    Join Date
    Sep 2008
    Posts
    238

    Default Re: Change PivotTables and Formula resultes depending on Filtered Rows on Main Worksheet

    Thanks,

    That worked for the dates.
    Any thoughts on getting the PivotTable to work the same way?
    Last edited by geospatial; Jun 20th, 2017 at 06:36 PM. Reason: Mistaken

  4. #4
    Board Regular
    Join Date
    Oct 2015
    Location
    Mc Calla, AL
    Posts
    126

    Default Re: Change PivotTables and Formula resultes depending on Filtered Rows on Main Worksheet

    I could see possibly doing that with VBA but offhand I can't think of a way to do that in native Excel. There are many way more experienced SMEs on this Forum, possibly one of them can provide a solution.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com