+ Reply to Thread
Results 1 to 8 of 8

FORMULA to COUNT LOWER 2 OF 3 VALUES

  1. #1
    Registered User
    Join Date
    08-03-2007
    Posts
    2

    FORMULA to COUNT LOWER 2 OF 3 VALUES

    Need some help with a formula please.

    Keeping golf scores for a list of players. Column A = Name; B = 1st round score; C = 2nd round; D = 3rd round score; E = TOTAL of best 2 rounds.

    e.g. A= John Doe B=75 C=72 D=80. I’m looking for a formula that excludes the 80 score, & sums the rest. In the example E= 147.

    A couple of events that need to be catered for:
    # If a player does not play one of the 3 rounds, cd I record 0(zero) as the value for that round and get the formula to ignore all zero values?
    # If 2 rounds (or even 3) had the same score, the formula wd need to cover that event..
    e.g. 70,70,77 = 140. and 72,75,75 = 147

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Here's a quick solution, although I'm sure there's a fancier way to do it:

    =IF(SMALL(B1:D1,1)=0,SUM(SMALL(B1:D1,2),SMALL(B1:D1,3)),SUM(SMALL(B1:D1,1),SMALL(B1:D1,2)))

  3. #3
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    Starting with PJoaqin's work, here is my take on this:

    =SUM(B1:D1)-IF(SMALL(B1:D1,1),SMALL(B1:D1,3),0)

    = Sum(3 scores) - IF(no 0, largest, otherwise 0)

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    FORMULA to COUNT LOWER 2 OF 3 VALUES

    With values in B2:D2

    Try this formula
    =SUM(IF(COUNTIF(B2:D2,">0")=3,SMALL(B2:D2,{1,2}),(B2:D2)))

    If 3 values > 0: sum of lower 2
    If 0 or 1 or 2 values > 0: sum of all

    Is that something you can use?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    =sum(b1:d1)-max(b1:d1)*sign(min(b1:d1))
    Last edited by mikerickson; 08-03-2007 at 11:39 PM.

  6. #6
    Registered User
    Join Date
    08-03-2007
    Posts
    2
    thanks to all. each suggestion worked!!! brilliant.
    The only issue remaining is this -
    if a player misses any two rounds (i.e. has two zeroes recorded) the only round played would incorrectly place that player ahead of the best combined two rounds. e.g. someone plays only the second round & scores 93. that wd position ahead of combined 2 round total of 138 (70+68).
    can i add to the formula by returning answer = blank for any range that includes two zero scores?
    note: i finally list all records by Data/sort/ascending on the values in "Total, Best 2 rounds" column

  7. #7
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Might I suggest adding two columns? Rather than sorting by your '2 best rounds' column, try using this array formula in another column (for example, column F, starting in F2 if your player data starts in A2), and fill downward for 2nd best, 3rd best, etc..:

    =SMALL(IF($E$2:$E$20>120,$E$2:$E$20),ROW(A1))

    After typing this formula you must press CTRL+SHIFT+ENTER, otherwise it won't work properly.

    I made two assumptions with this formula:
    1. Nobody will shoot higher than 120 in any one round
    2. Nobody will shoot lower than 120 in any two combined rounds

    If this isn't true, you may need to adjust 120 higher or lower.

    Then in column G, cell G2, use the formula:

    =INDEX(A2:A20,MATCH(F2,E2:E20,0))

    Just press ENTER after typing this formula, it's not an array formula. Fill that formula down as many rows as necessary and it will return the names associated with the ranked scores in column F.

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Quote Originally Posted by timmy5712
    can i add to the formula by returning answer = blank for any range that includes two zero scores?
    Try

    =CHOOSE(COUNTIF(B2:D2,">0")+1,"","",SUM(B2:D2), SUM(B2:D2)-MAX(B2:D2))

+ 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.6.0 RC 1