+ Reply to Thread
Results 1 to 14 of 14

Nest IF/IFS with OR and FILTER function On Drop Down Boxes

  1. #1
    Registered User
    Join Date
    09-04-2021
    Location
    Sheffield UK
    MS-Off Ver
    2013 and 365
    Posts
    11

    Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    Hi All,

    I've attached a workbook to further demonstrate my problem & my intended aim with this.

    What I need:
    I need a formula that uses drop down boxes to populate information in another part of the worksheet based on it's selection. It sounds straightforward but it has a few moving parts to it.
    First, I need the formula to bring back all Entry ID's relating to the Senior Manager, which then gets broken down further by Team Manager (I want the formula to rely on the OR statement here by showing the Senior Managers results first then if the filter has been selected for a Team Manager, then their results then show. If the Team Manager is deselected, then it reverts back to Senior Manager entries again (Until at least another selection is made for a different manager). I also need the formula to be clever enough to filter by days as well, so if an entry ID goes back 60 days, then it will bring back this criteria too.

    What I've tried (Please also see workbook example):
    =IFS(K17<>" ",FILTER('Raw Data'!F:F,('Raw Data'!J:J=K17),IFS(H17<>" ",FILTER('Raw Data'!F:F,('Raw Data'!K:K=H17),IF(N17="All",FILTER('Raw Data'!F:F,('Raw Data'!K:K=H17)*('Raw Data'!J:J=K17),""),FILTER('Raw Data'!F:F,('Raw Data'!K:K=H17)*('Raw Data'!J:J=K17)*IF(N17="passive/detractor",('Raw Data'!Z:Z="detractor")+('Raw Data'!Z:Z="passive"),('Raw Data'!Z:Z=N17)),0))))))

    Why this doesnt work:
    It returns entry_Id numbers as expected but the function to only bring back Senior Manager entries only isn't working because I have prioritised the formula for the Team Managers first. I get the same problem if I switch the formula round with Senior Managers being prioritised first. I also cannot get the date function right because this drop down boxes change but do not return anything within that date range, it's like it's being ignored completely. Example workbook has a #REF error but not too clear why yet.
    I've kept the cells in the same position that I have it in my live sheet.

    Key things which may help:
    The drop down boxes are pre-populated with data from another tab altogether using UNIQUE formulas - not included here because these work fine with the formulas, I just cant get all of it right.
    I'm using Excel with 365 capabilities, Enterprise version - so I should have all the latest functions. Arrays work without needing to do Control+Shift+Enter.
    I've tried to search for a query answer on various forums but cannot find one bespoke enough to my request but feel free to re-direct if I have missed anything.

    Any questions please let me know,
    thanks again in advance for any help.

    Craig.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    380

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    I've had to do this before & had to do it the other week in Access, anyways thisis Excel - can't remember which one of these it was:
    If it's been helpful please mark as helpful

  3. #3
    Registered User
    Join Date
    09-04-2021
    Location
    Sheffield UK
    MS-Off Ver
    2013 and 365
    Posts
    11

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    Thanks for this, the 1st video helped somewhat for dependent drop down lists but her method for executing returned values based on drop down didn't quite give me what I needed (Although I will watch it again later just to be sure I've not misunderstood it) - It was an interesting way of doing dependent drop downs without relying on the UNIQUE statement.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,817

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    In the sample file what value should cell E19 display and why?
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    09-04-2021
    Location
    Sheffield UK
    MS-Off Ver
    2013 and 365
    Posts
    11

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    E19 needs to display the output based on the drop downs from H, K & N17. So if Senior Manager 1 from the raw data was the only drop down selected, it would return his/her results
    but if we decided to select a manager under this senior leader, then it would then filter their results (results being Entry_ID from raw data).

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,995

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    If you are using FILTER, you have 365 not 2013. Please update your profile.

    Please note, as discovered in a recent thread, IFS needs to evaluate EVERY condition AND EVERY return value before it determines the FIRST TRUE condition and returns the corresponding value.

    Also, as there is no catch all TRUE condition and default value, the formula will return FALSE if there is no matching value.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Registered User
    Join Date
    09-04-2021
    Location
    Sheffield UK
    MS-Off Ver
    2013 and 365
    Posts
    11

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    I'm using both 2013 & 365 (one for personal, one work related), hence my comment at the top.

    IFS was a last ditch effort to get something back, FILTER works fine but it's getting the parameters on how it wants to be filtered which is the tricky part.
    Any help at answering this question is appreciated.
    Last edited by CraigofDoom; 03-05-2023 at 06:03 AM.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,817

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    Regarding Post #5: Please give the specific output expected in cell E19 given the values displayed in H17, K17 and N17 in the file attached to post #1.
    There is no ID# that corresponds to Senior Manager 1 (H17) and Team Manager 2 (K17). So what is the expected output?
    I don't understand how N17 could factor into the formula as there is no column on the Raw Data sheet that contains values listed in the drop down for cell N17.

  9. #9
    Registered User
    Join Date
    09-04-2021
    Location
    Sheffield UK
    MS-Off Ver
    2013 and 365
    Posts
    11

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    The corresponding output is based on the 2nd tab in the worksheet (Raw data), in column F as per the formula.
    So if Senior Manager 1 is selected, then all the row adjacent to column F with that senior manager has those results returned.
    Does that make sense?

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,817

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    Regarding the explanation given in post #9, try pasting the following into cell E19 and dragging the fill handle down to cell E22:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    09-04-2021
    Location
    Sheffield UK
    MS-Off Ver
    2013 and 365
    Posts
    11

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    Thank you that worked a charm based on 1 drop down - any chance the formula can be expended to include Team Manager as well from column J in the raw data? Thank you

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,817

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    Perhaps:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I still feel it would be helpful to see the specific ID's that should be displayed (i.e. 1234565, 1234568 and 1234570) so that we will know whether or not our proposed formulas/code are yielding the correct results.
    Let us know if you have any questions.

  13. #13
    Registered User
    Join Date
    09-04-2021
    Location
    Sheffield UK
    MS-Off Ver
    2013 and 365
    Posts
    11

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    Thank you, it's working as intended - I just spent some time changing the drop down boxes and comparing the output against the raw data (so the adjacent cells with Senior Manager 1 as example, brings back 1234565, 1234568 & 1234570 whereas because I filter further by Team Manager 1, admittedly it brings back 2 IDs instead of just the one expected however that was my fault because this team manager had more than 1 senior manager assigned, which wouldn't happen. So I'd safely say the formula is working as intended & I will now mark as resolved. A big thank you for your help, really appreciate it

  14. #14
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,817

    Re: Nest IF/IFS with OR and FILTER function On Drop Down Boxes

    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. [SOLVED] Filter Data With Multiple Drop-Down Boxes and Multiple Criteria
    By Nevanox in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-09-2022, 11:22 AM
  2. Filter Down Dataset using Drop Boxes with Multiple Variables
    By joninmichigan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-12-2020, 03:00 AM
  3. [SOLVED] How to nest if statement for advanced filter
    By waimea in forum Excel General
    Replies: 5
    Last Post: 11-05-2018, 05:06 PM
  4. Would like to convert drop down boxes to combo boxes
    By valeriej42 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2012, 12:40 PM
  5. Replies: 4
    Last Post: 06-26-2012, 03:53 AM
  6. ComboBox in Toolbar with drop down list and filter function.
    By ali84pk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2011, 07:30 AM
  7. [SOLVED] Creating Drop Down boxes with the List function...
    By JeanneW in forum Excel General
    Replies: 3
    Last Post: 06-01-2005, 10:05 AM

Tags for this Thread

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