+ Reply to Thread
Results 1 to 13 of 13

Filter within a filter?

  1. #1
    Registered User
    Join Date
    01-09-2015
    Location
    Winchester, VA
    MS-Off Ver
    2010
    Posts
    10

    Filter within a filter?

    Hello,

    I'm no excel guru, and the attached spreadsheet continues to evolve using the things that I am learning from this forum. I'm hoping to get a little more help with filters. The spreadsheet is normally used on a Windows 7 machine and MS Office 2010.

    This spreadsheet is a tool that I use to track training that is due every 12 months, and every 24 months. The cell colors are based on the date:

    green = training was completed within 12/24 months
    yellow = training is due in less than 30 days
    red = training is overdue

    The problem:
    With all of the filters turned off you can see there are only 5 people who are current on their "Drug Test". ROW 11 and ROW 12 are accurate according to the data shown.

    Now use the "Team" filter and checkmark only the Seahawks. The spreadsheet correctly shows two names, but the data in ROWs 10-15 never change. This is the same for all the columns under "Annual" and "24 months", and for every filter.

    I have had zero luck understanding how to modify the COUNTIFS. Can someone help me fix this issue?

    Thank you in advance.
    Attached Files Attached Files
    Last edited by Keyboard Ninja; 12-09-2015 at 06:57 AM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Filter within a filter?

    welcome to the forum, Keyboard Ninja. to work with autofilter, SUBTOTAL will help you. in A10:
    ="Total Names: "&SUBTOTAL(3,A3:A8)

    C11:
    =SUMPRODUCT(SUBTOTAL(3,OFFSET(C3,ROW(C3:C8)-ROW(C3),))*(C3:C8>TODAY()-365))

    the rest are pretty similar

    C12:
    =(C11/SUBTOTAL(3,$A$3:$A$8))

    you may read more about the SUMPRODUCT method explained in the file of my link below*Tips & Tutorials I Compiled, sheet 10

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    01-09-2015
    Location
    Winchester, VA
    MS-Off Ver
    2010
    Posts
    10

    Re: Filter within a filter?

    Quote Originally Posted by benishiryo View Post
    welcome to the forum, Keyboard Ninja. to work with autofilter, SUBTOTAL will help you. in A10:
    ="Total Names: "&SUBTOTAL(3,A3:A8)
    Hi,

    Thank you for the reply.

    When I use your formula for A10 I get a FALSE. Am I missing something?



    Edit: Nevermind. It was a typo on my part. Your formula worked great. Thanks!
    Last edited by Keyboard Ninja; 12-09-2015 at 07:26 AM.

  4. #4
    Registered User
    Join Date
    01-09-2015
    Location
    Winchester, VA
    MS-Off Ver
    2010
    Posts
    10

    Re: Filter within a filter?

    C11-C14 work great. Thank you!

    Also tried using this for cell D15 (and other cells in that row) with no luck.

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(D3,ROW(D3:D8)-ROW(D3),))*(D3:D8))
    Last edited by Keyboard Ninja; 12-09-2015 at 07:24 AM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Filter within a filter?

    try removing the last argument...
    =SUMPRODUCT(SUBTOTAL(3,OFFSET(D3,ROW(D3:D8)-ROW(D3),)))

    Format as General
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    01-09-2015
    Location
    Winchester, VA
    MS-Off Ver
    2010
    Posts
    10

    Re: Filter within a filter?

    That didn't work unfortunately.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Filter within a filter?

    I tested it on your data and it worked fine?
    D
    2
    [BGCOLOR=#FFFFFF]Domestic Abuse[/BGCOLOR]
    3
    02-Apr-15
    4
    25-Sep-15
    5
    03-Aug-15
    6
    13-Oct-15
    7
    14-Jul-13
    8
    29-Sep-15
    9
    10
    11
    5
    12
    83%
    13
    0
    14
    1
    15
    0
    16
    6
    17


    D
    2
    [BGCOLOR=#FFFFFF]Domestic Abuse[/BGCOLOR]
    3
    02-Apr-15
    4
    25-Sep-15
    5
    03-Aug-15
    6
    13-Oct-15
    7
    14-Jul-13
    8
    29-Sep-15
    9
    10
    11
    5
    12
    83%
    13
    0
    14
    1
    15
    0
    16
    5
    17


    edit: OK so teh copy/paste for the 2nd table did not turn out so good - I had filtered on only 2015

  8. #8
    Registered User
    Join Date
    01-09-2015
    Location
    Winchester, VA
    MS-Off Ver
    2010
    Posts
    10

    Re: Filter within a filter?

    Hi,

    I wish it did work.

    If there is a date in all of the cells then ROW 15 is supposed to be "0".

    Scenario (using the attached file)
    - C15 is supposed to read "0", because all of the cells have valid dates in them. After using the suggested formula, C15 starts off with "6". This isn't what I was hoping for.
    - D15 reads correct when unfiltered, but when Column B is filtered nothing changes in D15. This is using the formula I started off with. Fill in D8 with any valid date, and D15 will go back to zero.

    I hope I'm explaining this right.

    Thank you!
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-09-2015
    Location
    Winchester, VA
    MS-Off Ver
    2010
    Posts
    10

    Re: Filter within a filter?

    Hello everyone,

    I still can't figure out how to get this thing to work. Does anyone have another suggestion? Thanks.

  10. #10
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Filter within a filter?

    hmmm this one got me stumped. have asked for help. very interested in knowing a solution too!

  11. #11
    Registered User
    Join Date
    04-29-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    10

    Re: Filter within a filter?

    It's cheating a little but:
    =SUBTOTAL(3,$A3:$A8)-SUBTOTAL(3,C3:C8)
    in C15 and copy across, assuming that column A will always have a name in each row.

  12. #12
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,729

    Re: Filter within a filter?

    If you will consider a helper column try this. In M3:M8 (masked out by black formatting) this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then in C11:G11.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In H11:L11.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And in C12 and fill across.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In C15:L15.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Now try filtering.
    If this does what you want then continue to include the helper column in the other COUNTIF(s) formulas in the remaining rows / columns.

    Does this do what you want?
    Attached Files Attached Files
    Dave

  13. #13
    Registered User
    Join Date
    01-09-2015
    Location
    Winchester, VA
    MS-Off Ver
    2010
    Posts
    10

    Re: Filter within a filter?

    Quote Originally Posted by jmhuk View Post
    It's cheating a little but:
    =SUBTOTAL(3,$A3:$A8)-SUBTOTAL(3,C3:C8)
    in C15 and copy across, assuming that column A will always have a name in each row.
    Column A will always have a name so this works great. Not sure why you think this is cheating.



    FlameRetired: Thanks, but I prefer not to have a helper column.

+ 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. Macro to filter a pivot whilst looping through filter criteria in a variable list.
    By Alistairm88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2015, 04:25 AM
  2. [SOLVED] Excel 2007-Adv Filter Copy and Loop with Nested Autofilter Using Values from Adv Filter
    By Southfish in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2014, 02:07 AM
  3. Replies: 6
    Last Post: 10-16-2014, 08:42 AM
  4. Need to filter a report filter based on the previous filter
    By elliotencore in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-28-2014, 07:44 AM
  5. 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
  6. Filter several pivot tables by one programmed date range filter in Excel 2003
    By olewka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2011, 11:49 AM
  7. Great Combo Filter/Search form, cant get DATE filter to integrate. HELP
    By fau5tu5 in forum Access Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2009, 05:05 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