+ Reply to Thread
Results 1 to 12 of 12

Filter only the columns based on another filter?

  1. #1
    Registered User
    Join Date
    10-12-2015
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    95

    Filter only the columns based on another filter?

    hi all, i would really appreciate if someone can help me out with this. So i have 2 sheets, 1 sheet would have list of training needed for each profession and other sheet will have the names of all the people along with all the trainings. Now, in the 2nd sheet when I filter a certain profession, i want all the trainings that are not required for that profession to be hidden? example attached. If i select accountant in the profession in the 2nd sheet, i only want to see outlook and excel.

    thanks

    this question is cross-posted on another forum

    https://www.mrexcel.com/board/thread...ilter.1138357/
    Last edited by terry3218; 06-26-2020 at 05:11 PM.

  2. #2
    Registered User
    Join Date
    10-12-2015
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    95

    Re: Filter only the columns based on another filter?

    here is an example attached
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-12-2015
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    95

    Re: Filter only the columns based on another filter?

    Anyone can please assist?

  4. #4
    Registered User
    Join Date
    06-26-2020
    Location
    Belize
    MS-Off Ver
    2010 Pro Plus
    Posts
    10

    Re: Filter only the columns based on another filter?

    I don't understand your expected result, so I'm not sure how to answer your question.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,920

    Re: Filter only the columns based on another filter?

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Registered User
    Join Date
    10-12-2015
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    95

    Re: Filter only the columns based on another filter?

    thanks, i have updated my original post

  7. #7
    Registered User
    Join Date
    10-12-2015
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    95

    Re: Filter only the columns based on another filter?

    Quote Originally Posted by miahallen View Post
    I don't understand your expected result, so I'm not sure how to answer your question.

    i have attached a sample workbook with expected result
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Filter only the columns based on another filter?

    Somewhat of a roundabout way that assumes only one profession to be selected in the filter.
    Populate column C using: =SUBTOTAL(103,B2)
    Populate D1:G1 using: =IF(COUNTIFS(INDEX(Training!$A2:$C4,,MATCH($J1,Training!$A1:$C1,0)),L1),L1,"")
    Populate J1 using: =INDEX(B2:B3,MATCH(1,C2:C3,0))
    Note that column C as well as cell J1 and L1:O1 may be moved and/or hidden for aesthetic purposes.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    10-12-2015
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    95

    Re: Filter only the columns based on another filter?

    Quote Originally Posted by JeteMc View Post
    Somewhat of a roundabout way that assumes only one profession to be selected in the filter.
    Populate column C using: =SUBTOTAL(103,B2)
    Populate D1:G1 using: =IF(COUNTIFS(INDEX(Training!$A2:$C4,,MATCH($J1,Training!$A1:$C1,0)),L1),L1,"")
    Populate J1 using: =INDEX(B2:B3,MATCH(1,C2:C3,0))
    Note that column C as well as cell J1 and L1:O1 may be moved and/or hidden for aesthetic purposes.
    Let us know if you have any questions.
    thanks. this works. However, I can see lot of blank columns if that training is not applicable to that profession. Is there a way to not have those blank column display the name of the previous or next visible column without duplicating?

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Filter only the columns based on another filter?

    The formula in cells D1:G1 has been changed to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The zero values that this formula produces in some cells is hidden using conditional formatting by setting the font of cells with a value of zero to white.
    (Please do not quote whole posts - use the Quick Reply window instead)
    Let us know if you have any questions.

  11. #11
    Registered User
    Join Date
    10-12-2015
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    95

    Re: Filter only the columns based on another filter?

    that's very helpful. thanks.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Filter only the columns based on another filter?

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Excel 2016 Filter Sorting Columns With No Filter
    By klavierkatze in forum Excel General
    Replies: 5
    Last Post: 05-13-2019, 11:01 PM
  2. [SOLVED] Filter data by Columns (a,b,c etc) and mark the top 3 items for each filter.
    By margetc in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-15-2018, 04:18 AM
  3. Replies: 5
    Last Post: 11-24-2014, 11:58 AM
  4. Replies: 6
    Last Post: 10-16-2014, 08:42 AM
  5. Using filter to highlight/filter duplicates in multiple columns but within 1 day
    By DaveBre in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2014, 04:07 AM
  6. 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
  7. 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

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