+ Reply to Thread
Results 1 to 15 of 15

Thread: Find the minimum while omitting some

  1. #1
    Registered User
    Join Date
    07-07-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    82

    Find the minimum while omitting some

    If I have a column where I want to find the lowest number, but do not want to include some of the data in the same column based on criteria from another column.

    Example, I don't want to include the numbers with the letter "N" in column B:

    A B
    1 N
    3 N
    2
    5
    6

  2. #2
    Forum Guru contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2010
    Posts
    1,342

    Re: Find the minimum while omiting some...

    Maybe this
    =SMALL(INDEX(NOT(B1:B5="N")*(A1:A5),0),COUNTIF(B1:B5,"N")+1)
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, «Born in USSR»
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Find the minimum while omiting some...

    =MIN(IF(B1:B5<>"N",A1:A5))


    use CTRL-Shift- Enter to enter as an array formula

  4. #4
    Registered User
    Join Date
    07-07-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    82

    Re: Find the minimum while omiting some...

    What if the column is already using a SUM formula?

    In my work sheet, column C would contain the "N" and column H would be a SUM calculation.

  5. #5
    Registered User
    Join Date
    07-07-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    82

    Re: Find the minimum while omiting some...

    Attached is an example of what I am trying to do. Looking for a formula that will omit players that are not qualified based on multiple criteria.
    Attached Files Attached Files

  6. #6
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Find the minimum while omiting some...

    Is this a different question/example? I have no idea what you are asking now. It seems to bear no relation to the original post. I'm afraid I can't modify the original formula as I can't relate to the problem.

    Where did the footballers come from?

    Regards

  7. #7
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,798

    Re: Find the minimum while omiting some...

    mostly foreign imports, i think lol
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    07-07-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    82

    Re: Find the minimum while omiting some...

    TMShucks, Your formula resolved the issue for finding the low score and not including the score with the identifier "N".

    This is a golf pool sheet I am working on. We have two categories for the winners. A 100% handicap winner and a 80% handicap winner. But, the player has to agree to participate. Not all players will participate in each category (pool).

    The "net score" is calculated by subtracting the handicap number, from a gross score. Therefore I have a 100% HDCP column and a 80% HDCP column. The 100% HDCP number will be subtracted from the gross score to determine the winner of the 100% Pool. The 80% HDCP will be subtracted from the gross score to determine the winner of the 80% Pool.

    Using a column for each pool (two separate columns, 100% and 80%), I use the number "5" if that player is participating in each pool. Some players play in both, some pick one or the other.

    I want to be able to only use those who participate to be included in finding the low net score for each column (100% and 80%). And, not include the guests ("N"). So, I need a formula that recognizes the "5" in column D, participating in column H (100% HDCP), and also a "5" in column E as participating in column J (80% HDCP), as well as not using the guest players from column C with the "N".

    Very difficult to explain.

  9. #9
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Find the minimum while omiting some...

    could have done with some in the England team :-(

  10. #10
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,590

    Re: Find the minimum while omiting some...

    Are the English footballers now trying to play "Gowf"....

  11. #11
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Find the minimum while omitting some

    @bobby1949

    Your sample data does not match the description of what you want. However, I think I now understand and the formulae below give the results required (both entered as array formulae with CTRL-Shift-Enter):

    =MIN(IF($B2:$B11<>"G",IF(C2:C11=5,G2:G11)))

    =MIN(IF($B2:$B11<>"G",IF(D2:D11=5,I2:I11)))

    The first checks column B for NOT "G", column C for "EQUAL TO 5" and takes the minimum value from column G.

    See the sample spreadsheet which I have updated.

    Regards
    Attached Files Attached Files

  12. #12
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Find the minimum while omitting some

    Alternatively - amend the source values per your 2nd table, ie;

    G2: =IF(OR($B2="G",$C2<>5),"",E2-F2)
    copied down

    I2: =IF(OR($B2="G",$D2<>5),"",E2-H2)
    copied down

    The MIN are then standard functions

    G12: =MIN(G2:G11)
    I12: =MIN(I2:I11)

  13. #13
    Registered User
    Join Date
    07-07-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    82

    Re: Find the minimum while omitting some

    TMShucks, Thank you so very much. Your formula worked well on my sheet.
    DonkeyOte, thank you also for your suggestion.

    The best part is that I am learning so much from you all here. These sheets are practice for applications I may use in my "real" job.

    Now, to be a bigger pest, how would I be able to add the corresponding name to the min number. example: 77 - Steve or 73 - Karl

    If I am going too far with this, please, tell to go watch some football.

  14. #14
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Find the minimum while omitting some

    If you opt to do that I would definitely advise you amend the formulae in G2 etc so as to avoid need for Array - at which point:

    G12:
    =MIN(G$2:$G$11)&" - "&INDEX($A$2:$A$11,MATCH(MIN(G$2:G$11),G$2:G$11,0))

    As it is - by storing both MIN value and name within the same cell you are double evaluating the MIN function, however, at least not in Array form (ie standard MIN is fast).

  15. #15
    Registered User
    Join Date
    07-07-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    82

    Re: Find the minimum while omitting some

    DdonkeyOte, PERFECT!

    I formatted exactly how you suggested and it is fast and clean.

    Thanks Much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0