+ Reply to Thread
Results 1 to 11 of 11

Combination If Function

  1. #1
    Registered User
    Join Date
    01-07-2021
    Location
    Nottingham, England
    MS-Off Ver
    2016
    Posts
    24

    Post Combination If Function

    Hi,

    I am wanting to do a drop down list where you can select multiple options. For a list Attachment 1, Attachment 2, Attachment 3, Attachment 4, Attachment 5. If the combination is the same as in the list then you will get a "Pass" and if not then a "Fail"

    I am struggling to see how you would do it if only not all of the items from the drop down box is selected.

    Apologies if this this isn`t what these forums are intended for. My knowledge is very little compared to some people on here!

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Combination If Function

    could you explain your request more? Your attachment shows 5 attachments and attachment dropdown in cells B2 through B6 and a pass/fail in A8.
    What is/are the results you expect and where based on which dropdown?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    01-07-2021
    Location
    Nottingham, England
    MS-Off Ver
    2016
    Posts
    24

    Re: Combination If Function

    Hi Sam,

    To give a bit of background is that I have a product and a customer has given us 5 different attachments that he is wanting to mount onto the product. Basically we have said that you cannot mount all of these on the product at the same time. So he has come back asking if we could provide a sheet which will demonstrate that if item 1, 2 and 3 are fixed will this work. or if Item 1, 3 and 5 are mounted will this work and so on...

    I am yet to collate all the information but wanted to make sure and how it would be done before I start collating the information.

    I have attached an excel spreadsheet which I have tried to simplify and I have given different scenarios to give a bit of context if that`s any use

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Combination If Function

    but in your attachment you seem to be saying that, for example (cells F63 through J65 - Random Scenario 4) you have 7 Ys and 8 Ns and multiple rows with either Y or N in the same column under the attachments. So why the additional rows (rows 64 and 65), how do they factor in with row 63? AND why is Attachments 2, 3 and 5 a pass for that while 1, 2 and 4 are a fail for row 27 with the attachments listed in F27 through J29 (Random Scenario 2)?
    What makes a scenario a pass vs fail?

  5. #5
    Registered User
    Join Date
    01-07-2021
    Location
    Nottingham, England
    MS-Off Ver
    2016
    Posts
    24

    Re: Combination If Function

    Hi,

    I am trying to find the best way of laying it out in excel.

    I have tried another approach. Hope this one makes sense, I have stated the different potential combinations.

    Its not the full list as I haven't collated all the data yet.
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Combination If Function

    There are 5 cells with dropdowns in them A2:A6. The maximum number of attachments in your combinations is 3.

    What happens if 4+ attachments are chosen in the DDs

    Can there be gaps in A2:A6... so A2 = Att 1 and a5 is Att 2; the rest are blank. Is that a Pass or a fail?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Registered User
    Join Date
    01-07-2021
    Location
    Nottingham, England
    MS-Off Ver
    2016
    Posts
    24

    Re: Combination If Function

    Hi thanks for the fast reply.

    I have done an example.

    My aim is eventually to have the combinations hidden. then the user will enter the different attachments they are wanting to have. Based on these it will search to see if the combination exists in the combination list. If it does then it will say pass. if not then it will say fail.
    Attached Files Attached Files

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Combination If Function

    this is a little clunky and needs a helper column for it, I put that in cells G6 through G13. In that helper column I made this concatenate formula...
    =D6&E6&F6 in D6 and dragged down.
    then this vlookup which for more combinations you'll have to adjust...
    =IFERROR(IF(AND(COUNTIF(A3:A6,"<>")=2,VLOOKUP(A3&A4,$G$6:$G$13,1,FALSE)=A3&A4),"Pass",IF(AND(COUNTIF(A3:A6,"<>")=3,VLOOKUP(A3&A4&A5,$G$6:$G$13,1,FALSE)=A3&A4&A5),"Pass",IF(AND(COUNTIF(A3:A6,"<>")=4,VLOOKUP(A3&A4&A5,$G$6:$G$13,1,FALSE)=A3&A4&A5),"Pass"))),"Fail")

    I think it can be done with an array using one formula but I've had trouble writing it in the version of excel I now have.

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Combination If Function

    this one works as well using the concatenate list in post#8 but is much shorter...
    =IFERROR(IF(VLOOKUP(A3&A4&A5&A6,$G$6:$G$13,1,FALSE)=A3&A4&A5&A6,"Pass"),"Fail")

  10. #10
    Registered User
    Join Date
    01-07-2021
    Location
    Nottingham, England
    MS-Off Ver
    2016
    Posts
    24

    Re: Combination If Function

    Thanks that works perfect!
    The only problem you will have is when there is a random combination inserted into the attachment combination. Unless you can think of a solution is to either limit each list to one attachment. for example A3 will only allow you to select attachment and so on... Or to have every combination inserted into the list. for example Attachment 1 and 2 will also have the combination of 2 and 1

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

    Re: Combination If Function

    It appears that in order to add any of the last four attachments, attachment 1 is necessary.
    The drop down for cell A3 would only display Attachment 1
    The drop down for cell A4 would include the last four attachments but only if attachment 1 is chosen in cell A3, otherwise nothing is displayed
    The drop down for cell A5 will display the two appropriate attachments if attachment 2 is selected in cell A4, the one appropriate attachment if attachment 3 is selected in cell A4 and will not display any options otherwise.
    This avoids the customer choosing attachments that will not go together.
    Note that cells C3:C4 are populated using: =SUBSTITUTE(A3," ","_") and the results are hidden by choosing white as the font color.
    Note that the dropdowns in cells A4:A5 are populated using =INDIRECT(C3) and =INDIRECT(C4) respectively.
    Note that lists are placed in columns N:Q
    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.

+ 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. help with IF function in combination with Search/OR function
    By Zoe_83 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2014, 08:47 AM
  2. Using IF function with mutilple criteria in combination with MID function
    By ryguy104gt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-21-2013, 06:03 PM
  3. [SOLVED] IF function combination of COUNTIF function
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2012, 01:53 AM
  4. Replies: 2
    Last Post: 08-16-2011, 04:22 PM
  5. Combination Function
    By theshark43 in forum Excel General
    Replies: 9
    Last Post: 03-02-2010, 03:40 PM
  6. IF and OR function combination
    By Mofa in forum Excel General
    Replies: 4
    Last Post: 03-20-2009, 08:27 AM
  7. Combination Function?
    By teresa2136 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-07-2008, 10:20 AM
  8. [SOLVED] Help with Combination function
    By Santhosh Mani in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-14-2005, 12:45 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