Forum Discussion

star_man35's avatar
star_man35
Copper Contributor
Mar 14, 2022
Solved

Excel 365, sorting rows of a range

I have a range of single digit numbers (please see below) and I want to sort each row Largest to Smallest (i.e., largest digits on the left and in descending order to the right). If I Custom sort eac...
  • PeterBartholomew1's avatar
    Mar 14, 2022

    star_man35 

    If 'row' is a relative reference to a single row, then

    = SORT(row,,-1,1)

    will create a sorted copy of the row which may be filled down to complete the table.  To do the same thing with a single formula requires the latest version of 365

    = MAKEARRAY(11,6,
          LAMBDA(r,c,
             INDEX(SORT(INDEX(data,r,),,-1,1),c)
          )
      )

Resources