Forum Discussion

pevenden's avatar
pevenden
Copper Contributor
May 31, 2026

sort by column then by numbers in a row

HI all

I have a table of results pictured here. Once the results are in, I sort the table by the Total Score Column. When we have a tie (as in line 3 & 4, I need to sort by who has the most highest score... so, who has the most 9 (equal here), then by most 8.5 (line 4 wins the tiebreaker, 4 over 2)

Can I do this so it doesn't affect the order of the columns but just the rows involved. 

 

1 Reply

  • IlirU's avatar
    IlirU
    Iron Contributor

    Hi pevenden​,

    Does this formula help you? I have applied it to cell S1 (see screenshot). Try it and let me know.

    =LET(
    data, A1:Q9,
      dr, DROP(data, 1),
          VSTACK(TAKE(data, 1), CHOOSECOLS(SORT(HSTACK(dr, --TEXTSPLIT(TEXTJOIN(";",,
            BYROW(CHOOSECOLS(dr, SEQUENCE(, 13, 4)),
                  LAMBDA(b, ARRAYTOTEXT(BYCOL(SEQUENCE(, 9, 9, -0.5),
                  LAMBDA(a, SUM(--(b = a)))))))), ", ", ";")), SEQUENCE(, 10, 17),
                 -SIGN(SEQUENCE(, 10))), SEQUENCE(, 17)))
    )

    HTH

    IlirU