+ Reply to Thread
Results 1 to 14 of 14

Index formula with more than two criteria

  1. #1
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Index formula with more than two criteria

    Hi guys,

    I need your help with this table, where I need to identify the highest risk product made on a given equipment based on risk score number.
    As shown in the table, there different products made on each equipment and those cells are marked "Y". Each column with Y's contain a risk score in the bottom of the table. However, there might be two products having highest risk score like in row 7 where there are 2 products having risk score of 90. In this case, the formula should select the product with largest batch size (row 6).

    The work sheet is attached. Thanks in advance.

    Risk score.jpg
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Index formula with more than two criteria

    T7=IF(COUNTIF(E7:S7,"Y"),INDEX($E$2:$S$2,MATCH(SUMPRODUCT(MAX(($E7:$S7="Y")*($E$22:$S$22)*($E$6:$S$6/10000))),INDEX(($E7:$S7="Y")*($E$22:$S$22)*($E$6:$S$6/10000),0),0)),"")

    Try this and copy towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index formula with more than two criteria

    Thank you so much Siva. I really appreciate it.

    Edit: Siva, when I applied the formula to my original table (expanded table), the formula didn't work properly.

    See for example row 9, few products have risk score of 140 but yet the formula selected another product.
    Attached Files Attached Files
    Last edited by mq1973; 12-31-2017 at 12:46 PM.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Index formula with more than two criteria

    There is a little mistake in the formula try below formula and copy towards down

    fr9=IF(COUNTIF(E9:FQ9,"Y"),INDEX($E$4:$FQ$4,MATCH(SUMPRODUCT(MAX(($E9:$FQ9="Y")*($E$59:$FQ$59+$E$8:$FQ$8/100000))),INDEX(($E9:$FQ9="Y")*($E$59:$FQ$59+$E$8:$FQ$8/100000),0),0)),"")
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index formula with more than two criteria

    I verified it. It works perfectly . Thanks so much Siva.
    Last edited by mq1973; 12-31-2017 at 12:45 PM.

  6. #6
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index formula with more than two criteria

    Hi Siva, I am looking for a formula in column FS that finds the product with highest “MDD” (row 9) and if more than one product have the highest MDD, then select the product with smallest batch size (row 8).

    Regards,
    Attached Files Attached Files

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,788

    Re: Index formula with more than two criteria

    The thread is currently marked as solved ... If this is a new request, you ought to start a new thread.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index formula with more than two criteria

    Oh Ok. Will do.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,788

    Re: Index formula with more than two criteria

    Feel free to provide a link to this thread from the new one, if you think it's relevant.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,788

    Re: Index formula with more than two criteria

    I see that you have now posted an almost identical request on another forum. This counts as a cross post - see the rules about cross-posting (which are the same on all forums):

    Rule 08: Cross-posting Without Links

    Do not cross-post your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    Please provide cross-post links immediately. Thanks.

  11. #11
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index formula with more than two criteria

    Hi Ali, I do understand the forum rules and trust me, I wouldn't want to waste anyone's time. You wrote that the thread is marked Solved and I am ought to start a new thread. That's exactly what I di d. Plus, the request on another forum you referring to, is maybe similar but not the same. I didn't want to ask too many questions here.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,788

    Re: Index formula with more than two criteria

    You can ask as many questions as you like here, don't worry about that! Where is the new thread you started? I could not find it here on this forum when I looked, hence my advice.

  13. #13
    Forum Contributor
    Join Date
    04-26-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2021
    Posts
    211

    Re: Index formula with more than two criteria

    Thanks Ali for understanding. I didn't open a new thread here yet but I did on another forum. I will open a new thread here and provide a link to the other thread, in case the solution from the other forum doesn't work.

    Regards,
    Last edited by mq1973; 01-02-2018 at 01:25 PM.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,788

    Re: Index formula with more than two criteria

    If and when you do, remember to post cross-post links if you've already asked the same thing elsewhere.

+ 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] Index and Two Match Criteria- meeting both criteria (need help to repair formula)
    By OilAndGasMan1984 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2017, 10:56 PM
  2. Help adding criteria to INDEX formula
    By marciofo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-09-2016, 04:44 AM
  3. Vlookup or Index formula with 2 criteria
    By realrookie in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 02-21-2016, 05:03 PM
  4. [SOLVED] Index formula with two criteria using two sheets
    By jim0000 in forum Excel General
    Replies: 5
    Last Post: 07-01-2015, 12:52 PM
  5. Index and IF formula with multiple qualifying criteria
    By NadaNoodle in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-04-2012, 08:53 AM
  6. Excel 2007 : Index Formula: 2 Criteria Help
    By SimpleJack in forum Excel General
    Replies: 1
    Last Post: 09-12-2011, 11:22 PM
  7. Add a criteria to an Index and Match formula
    By Tomkat743 in forum Excel General
    Replies: 2
    Last Post: 03-31-2006, 12:35 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