+ Reply to Thread
Results 1 to 20 of 20

Index with one condition and an OR conditon between 2

  1. #1
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Index with one condition and an OR conditon between 2

    Hi,

    Had some help on this spreadsheet a while back but now its expanded.

    So the problem is this

    On the EM Ranking tab I need E3 to pull through the player numbers from the triallists tab.

    The array formula on E3 currently reads as this

    =IFERROR(INDEX(Trialists!$E$2:$E$44, SMALL(IF((E$2=Trialists!$B$2:$B$44)*(Trialists!$A$2:$A$44="Yes"), ROW(Trialists!$E$2:$E$44)-1,""), ROW()-2)),"")

    which works fine.

    The OR condition I need now that is considered E$2=Trialists!$B$2:$B$44 or (Trialists!$C$2:$C$44="Yes")

    So the first one for E2 is whether B2:B44 = EM on the triallist tab

    or

    Whether C2:C44 = Yes (they wouldnt have EM associated with it)

    I will still need (Trialists!$A$2:$A$44="Yes") in the formula

    Hope that makes sense?

    Thanks in advance

    Andrew
    Attached Files Attached Files

  2. #2
    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,617

    Re: Index with one condition and an OR conditon between 2

    Perhaps try this:

    =IFERROR(INDEX(Trialists!$E$2:$E$44, SMALL(IF(((E$2=Trialists!$B$2:$B$44)+(Trialists!$C$2:$C$44="Yes"))*(Trialists!$A$2:$A$44="Yes"), ROW(Trialists!$E$2:$E$44)-1,""), ROW()-2)),"")
    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.

  3. #3
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Index with one condition and an OR conditon between 2

    That brings through the players who are U24M category but also Elite.

    It doesnt bring through the players wo are in category EM

    These are the numbers I would expect

    81
    86
    87
    92
    96
    165
    166
    167
    168
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    Attached Files Attached Files
    Last edited by AliGW; 05-30-2020 at 12:50 PM. Reason: Please don’t quote unnecessarily!

  4. #4
    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,617

    Re: Index with one condition and an OR conditon between 2

    Well, none of the EM are YES in the adjacent column. You said this:

    I will still need (Trialists!$A$2:$A$44="Yes") in the formula
    So maybe a bit more clarity?

  5. #5
    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,617

    Re: Index with one condition and an OR conditon between 2

    Maybe you mean this:

    =IFERROR(INDEX(Trialists!$E$2:$E$44, SMALL(IF((E$2=Trialists!$B$2:$B$44)+(Trialists!$A$2:$A$44="Yes"), ROW(Trialists!$E$2:$E$44)-1,""), ROW()-2)),"")

  6. #6
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Index with one condition and an OR conditon between 2

    Quote Originally Posted by AliGW View Post
    Maybe you mean this:

    =IFERROR(INDEX(Trialists!$E$2:$E$44, SMALL(IF((E$2=Trialists!$B$2:$B$44)+(Trialists!$A$2:$A$44="Yes"), ROW(Trialists!$E$2:$E$44)-1,""), ROW()-2)),"")
    Hi Ali, the criteria I need to meet is the following

    Tab - Triallists
    A2 and down = Yes
    B2 and down = EM
    plus
    C2 and down = Yes

    That should provide the numbers required

  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,617

    Re: Index with one condition and an OR conditon between 2

    So you need all criteria meeting? If so, it’s not an OR match, it’s an AND match.

    =IFERROR(INDEX(Trialists!$E$2:$E$44, SMALL(IF((E$2=Trialists!$B$2:$B$44)*(Trialists!$A$2:$A$44="Yes") *(Trialists!$c$2:$C$44="Yes"),ROW(Trialists!$E$2:$E$44)-1,""), ROW()-2)),"")

  8. #8
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Index with one condition and an OR conditon between 2

    Quote Originally Posted by AliGW View Post
    So you need all criteria meeting? If so, it’s not an OR match, it’s an AND match.

    =IFERROR(INDEX(Trialists!$E$2:$E$44, SMALL(IF((E$2=Trialists!$B$2:$B$44)*(Trialists!$A$2:$A$44="Yes") *(Trialists!$c$2:$C$44="Yes"),ROW(Trialists!$E$2:$E$44)-1,""), ROW()-2)),"")
    Not quite, If its EM the number is returned. If it has a Yes against the Elite column that number is also returned.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Index with one condition and an OR conditon between 2

    Is this what you mean?
    =IFERROR(INDEX(Trialists!$E$2:$E$44,AGGREGATE(15,6,(ROW(Trialists!$E$2:$E$44)-ROW(Trialists!$E$2)+1)/((Trialists!$B$2:$B$44=$E$2)+((Trialists!$A$2:$A$44="Yes")*(Trialists!$C$2:$C$44="Yes"))),ROWS(E$3:E3))),"")

    B=EM or A & C =Yes

  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,617

    Re: Index with one condition and an OR conditon between 2

    Sorry - I’m not getting what you want.

  11. #11
    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,617

    Re: Index with one condition and an OR conditon between 2

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.

  12. #12
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Index with one condition and an OR conditon between 2

    Quote Originally Posted by Fluff13 View Post
    Is this what you mean?
    =IFERROR(INDEX(Trialists!$E$2:$E$44,AGGREGATE(15,6,(ROW(Trialists!$E$2:$E$44)-ROW(Trialists!$E$2)+1)/((Trialists!$B$2:$B$44=$E$2)+((Trialists!$A$2:$A$44="Yes")*(Trialists!$C$2:$C$44="Yes"))),ROWS(E$3:E3))),"")

    B=EM or A & C =Yes
    Thats the one. That formula is so far above my level its untrue

  13. #13
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Index with one condition and an OR conditon between 2

    Glad we could help & thanks for the feedback.

  14. #14
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Index with one condition and an OR conditon between 2

    Fluff13, Ive just realsied I need one more condition added.

    I also need G2 and below to equal M

    Can you rejig the formula please?

    B=EM or A + 'G = M' & C =Yes
    Last edited by AliGW; 05-30-2020 at 04:53 PM.

  15. #15
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Index with one condition and an OR conditon between 2

    How about
    =IFERROR(INDEX(Trialists!$E$2:$E$44,AGGREGATE(15,6,(ROW(Trialists!$E$2:$E$44)-ROW(Trialists!$E$2)+1)/((Trialists!$B$2:$B$44=$E$2)+((Trialists!$G$2:$G$44="M")*(Trialists!$A$2:$A$44="Yes")*(Trialists!$C$2:$C$44="Yes"))),ROWS(E$3:E3))),"")

    Also please read post#11

  16. #16
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Index with one condition and an OR conditon between 2

    Hi Fluff, that isnt returning the correct result. Its pulling through 71 as the first number from column G = M

    Edit: Me being stupid
    Last edited by AliGW; 05-30-2020 at 04:53 PM.

  17. #17
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Index with one condition and an OR conditon between 2

    Not for me it doesn't, I get.

    Excel 2016 (Windows) 32 bit
    E
    F
    2
    EM
    Beep Test
    3
    73
    0.0
    4
    77
    27.0
    5
    81
    28.0
    6
    86
    28.0
    7
    87
    23.0
    8
    92
    23.0
    9
    96
    26.0
    10
    165
    0.0
    11
    166
    0.0
    12
    167
    0.0
    13
    168
    0.0
    14
    170
    0.0
    15
    171
    0.0
    16
    172
    0.0
    17
    173
    0.0
    18
    174
    0.0
    19
    175
    0.0
    20
    176
    0.0
    21
    177
    0.0
    22
    178
    0.0
    23
    179
    0.0
    24
    180
    0.0
    25
    181
    0.0
    26
    182
    0.0
    27
    183
    0.0
    Sheet: EM Rankings

  18. #18
    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,617

    Re: Index with one condition and an OR conditon between 2

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

    A word of thanks might be nice, too ...

  19. #19
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Index with one condition and an OR conditon between 2

    Thankyou veyr much for all your help

  20. #20
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Index with one condition and an OR conditon between 2

    Glad we could help & thanks for the feedback.

+ 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] If Conditon with And Function
    By R0CKY in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-08-2017, 04:58 AM
  2. [SOLVED] If Conditon with And Function
    By HaroonSid in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2017, 10:48 AM
  3. AND Conditon not Working
    By cheztaa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-07-2017, 05:29 PM
  4. Help popup window if condition is TRUE in change event if conditon is true
    By fanku in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-09-2014, 12:46 PM
  5. [SOLVED] Copy Down sum formula with conditon
    By HaroonSid in forum Excel General
    Replies: 6
    Last Post: 04-26-2014, 10:21 AM
  6. Copy Down sum formula with conditon
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2014, 10:16 AM
  7. [SOLVED] Stop Print If conditon are not met
    By robrobet in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-30-2013, 01: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