Forum Discussion

willwonka's avatar
willwonka
Copper Contributor
Mar 06, 2026
Solved

Looking for help with a single Dynamic Formula Ranking Points by player and dropping lowest score

Name Finishes

Andrew 1,1,2,3,7,8

Randy 2,4,5,5,8,9

Chris 1,1,2,3,7,8

Bill 1,4,6,6,7,9

Jeff 2,3,5,7,8,8

Reed 4,4,6,7,7,9

Doc 3,5,5,6,7,9

Steve 1,3,5,6,8,9

Paul 2,2,3,3,4,9

 

Points (1st, 2nd, etc)

165

105

75

50

35

25

20

15

10

 

Expected answer with lowest point dropped

 

Name Points

Chris 530

Andrew 510

Paul 410

Steve 315

Bill 285

Jeff 250

Randy 240

Doc 190

Reed 165

  • willwonka​,

    In cell E2 apply this formula:

    =LET(
     d, A2:.C15,
    tk, TAKE, br, BYROW,
    ts, TEXTSPLIT, tj, TEXTJOIN,
        SORT(HSTACK(tk(d,, 1), br(--DROP(ts(tj(";",, br(--ts(tj(";",, CHOOSECOLS(d, 2)), ",", ";"),
        LAMBDA(a, ARRAYTOTEXT(CHOOSEROWS(SORT(tk(d,, -1),, -1), a))))), ", ", ";"),, -1), SUM)), 2, -1)
    )

    Hope this helps.

    IlirU

18 Replies

    • willwonka's avatar
      willwonka
      Copper Contributor

      Very cool.  I definitely need to step up my Power Query game.  I went ahead and deleted the middle columns.  Thanks for the solution.

  • IlirU's avatar
    IlirU
    Iron Contributor

    willwonka​,

    In cell E2 apply this formula:

    =LET(
     d, A2:.C15,
    tk, TAKE, br, BYROW,
    ts, TEXTSPLIT, tj, TEXTJOIN,
        SORT(HSTACK(tk(d,, 1), br(--DROP(ts(tj(";",, br(--ts(tj(";",, CHOOSECOLS(d, 2)), ",", ";"),
        LAMBDA(a, ARRAYTOTEXT(CHOOSEROWS(SORT(tk(d,, -1),, -1), a))))), ", ", ";"),, -1), SUM)), 2, -1)
    )

    Hope this helps.

    IlirU

  • Just to demonstrate it is always possible to make a solution more complicated!

     

     

     

     

     

     

     

    Worksheet formula
    = RANKEDλ(Name, Finishes)
    
    //  RANKEDλ calls SCOREλ by player then sorts results descending
    RANKEDλ = LAMBDA(name, finishes,
        LET(
            pts, MAP(finishes, SCOREλ),
            SORTBY(CONCATENATE(name, ": ", pts), pts,-1)
        )
    );
    
    //  SCOREλ converts finishes into a point score
    SCOREλ = LAMBDA(fin,
        LET(
            places, DROP(REGEXEXTRACT(fin, "\d+", 1),,-1),
            SUM(INDEX(points, VALUE(places)))
        )
    );

     

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Practically the same as Olufemi7​ suggested

    =SORT( HSTACK(
      REGEXEXTRACT(NameFinishes, "\w*",1),
      MAP( NameFinishes, LAMBDA(v,
        SUM(
          CHOOSEROWS(
             Points,
             DROP( SORT( --REGEXEXTRACT(v, "\d+",1),,,1 ),,-1)
          )
        )
       ))
      ),
    2,-1)
  • IlirU's avatar
    IlirU
    Iron Contributor

    willwonka​,

    I don't understand exactly what you are trying to accomplish, so I think it would be best if you posted a screenshot so that I can understand where your data is located and manually set the results you want to get from that data. So explain your problem better so that I or another contributor to this forum can try to help you.

    IlirU

    • willwonka's avatar
      willwonka
      Copper Contributor

      My end goal is just getting a Standings Table to publish to my group the standings of our league.

      My True Data looks like this (before I converted to a "challenge" type format.  I'm sure there is an even better/shorter dynamic formula to get to desired results here:

       

      TourneyPlaceNamePoints1st2nd3rd4th5th6th7th8th9th
      11Andrew165100000000
      12Randy105010000000
      13Chris75001000000
      14Bill50000100000
      15Jeff35000010000
      16Reed25000001000
      17Doc20000000100
      18Steve15000000010
      19Paul10000000001
      21Steve165100000000
      22Paul105010000000
      23Doc75001000000
      24Reed50000100000
      25Randy35000010000
      26Andrew25000001000
      27Chris20000000100
      28Jeff15000000010
      29Bill10000000001
      31Andrew165100000000
      32Chris105010000000
      33Paul75001000000
      34Randy50000100000
      35Doc35000010000
      36Steve25000001000
      37Bill20000000100
      38Jeff15000000010
      39Reed10000000001
      41Chris165100000000
      42Jeff105010000000
      43Steve75001000000
      44Paul50000100000
      45Doc35000010000
      46Bill25000001000
      47Reed20000000100
      48Andrew15000000010
      49Randy10000000001
      51Chris165100000000
      52Andrew105010000000
      53Paul75001000000
      54Reed50000100000
      55Steve35000010000
      56Bill25000001000
      57Jeff20000000100
      58Randy15000000010
      59Doc10000000001
      61Bill165100000000
      62Paul105010000000
      63Jeff75001000000
      64Andrew50000100000
      65Randy35000010000
      66Doc25000001000
      67Reed20000000100
      68Chris15000000010
      69Steve10000000001
      • IlirU's avatar
        IlirU
        Iron Contributor

        willwonka​,

        In cell O1 apply below formula:

        =LET(
             place, B2:B55,
              name, C2:C55,
            points, D2:D55,
                dr, DROP(PIVOTBY(name, place, points, SUM,, 0,, 0), 1),
                dp, DROP(dr,, 1),
                hs, HSTACK(dr, BYROW(dp, SUM) - BYROW(dp, MIN)),
               clm, COLUMNS(hs),
                    VSTACK(HSTACK("Name", SEQUENCE(, clm - 2), "Total"), SORT(hs, clm, -1))
        )

        Hope this helps.

         

        Note: Thank you for marking my previous reply as a Valid Answer.

        IlirU

  • Olufemi7's avatar
    Olufemi7
    Iron Contributor

    Hellowillwonka​,

    Assuming A2:A10 contains Names, B2:B10 contains Finishes stored as text such as 1,1,2,3,7,8 and D2:D10 contains the points for positions 1 to 9 (165,105,75,50,35,25,20,15,10).

    Use this dynamic formula

    =LET(n,A2:A10,f,B2:B10,p,D2:D10,s,MAP(f,LAMBDA(x,LET(pos,--TEXTSPLIT(x,","),pts,INDEX(p,pos),SUM(DROP(SORT(pts),1))))),SORT(HSTACK(n,s),2,-1))

    TEXTSPLIT converts the finish string into an array of positions. INDEX maps each position to the corresponding points. SORT orders the points so the lowest value is first and DROP removes that lowest score. SUM totals the remaining scores. MAP performs the calculation for each player. HSTACK combines names with the totals and SORT ranks the result by points in descending order. The result returns the expected ranking such as Chris 530, Andrew 510, Paul 410, Steve 315, Bill 285, Jeff 250, Randy 240, Doc 190 and Reed 165.

    • willwonka's avatar
      willwonka
      Copper Contributor

      I am getting #CALC errors on second column.  I will take a closer look.  Thanks for the formula.