+ Reply to Thread
Results 1 to 6 of 6

FILTER function using 2D matrix table

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2013
    Posts
    5

    FILTER function using 2D matrix table

    Hi All,

    Wondering if anyone could help with the below FILTER formula question.

    Based on the input in cell I2, I want to filter values in A2:A5 where the column header=I2 and the rows below the correct header are >0. In the screenshot below for example the INPUT is ROLE 1, so I would want the formula to search for 'ROLE 1' in B1:E1, then once it finds the correct column (in this case Column B), filter rows 2 to 5 (B2:B5) where the value is >0 and return the corresponding values in A2:A5.

    In this example the correct output in Apple and Watermelon.
    Screen Shot 2021-08-03 at 1.51.44 PM.png

    The formula =FILTER(A2:A5, B2:B5>0) solves the above in example when its just ROLE 1, but how could I get the formula to first check the role input in I2 to determine which column to filter >0?

    Thanks!
    Last edited by AliGW; 08-03-2021 at 02:33 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,466

    Re: FILTER function

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are still a novice here, I have done it for you today.)
    Last edited by AliGW; 08-03-2021 at 02:34 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,466

    Re: FILTER function using 2D matrix table

    Welcome back to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    Please update your forum profile: you are not still using Excel 2010 if you have FILTER.

  4. #4
    Registered User
    Join Date
    05-31-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: FILTER function using 2D matrix table

    Hi, I have updated thanks

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,466

    Re: FILTER function using 2D matrix table

    Try this:

    =FILTER(A2:A5,INDEX(B2:E5,,MATCH(I2,B1:E1,0)))

    Hi, I have updated thanks
    No, it's still wrong. FILTER is new in MS365, so you aren't using Excel 2013!
    Last edited by AliGW; 08-03-2021 at 02:46 AM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,466

    Re: FILTER function using 2D matrix table

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Last edited by AliGW; 08-03-2021 at 03:14 AM.

+ 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. Optional FILTER in FILTER() Function
    By Yohnson in forum Excel General
    Replies: 21
    Last Post: 07-08-2021, 07:31 AM
  2. [SOLVED] Get Max and Min Value using Filter function
    By mikehk in forum Excel General
    Replies: 5
    Last Post: 03-06-2021, 11:43 AM
  3. Filter function in Office 365 - filter with designated field
    By Eric Tsang in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-28-2020, 10:55 AM
  4. [SOLVED] Help : Macro Function - unable to apply filter function after macro the file.
    By Shermaine2010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2013, 12:50 AM
  5. Help with the filter function.
    By justifiedcandy in forum Excel General
    Replies: 6
    Last Post: 08-19-2010, 02:04 PM
  6. Filter function
    By Brian Brandt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2006, 07:59 AM
  7. advanced filter a range:Advanced Filter function
    By Il Principe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10: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