Forum Discussion

Excel's avatar
Excel
Iron Contributor
Mar 14, 2022

Sorting a Number

Hello Everyone,

I want to arrange the list of amounts in such a way that, $48 comes in the first place and $24.78 goes to the last, basically I want to reverse the list.

 

It should be result come like this with the help of Formula - 

 

So, what formula should i apply?

Please help..

I am using Microsoft Office 2016

 

 

Here is a attached file...

 

 

5 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Excel The screenshot does not show a reverse list. It merely swapped the first and the last number. If reversing the list is what you want, use this in B1 and fill down:

    =INDEX(list,COUNT(list)-ROW()+1)

    where "list" is a named range referring to A1:A17. 

    • Excel's avatar
      Excel
      Iron Contributor

      Thank you so much sir.

      Yes sir, i want to swap first and last number with the help of formula.

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi Excel 

     

    Assuming numbers & no blanks in A1:A17 (edited):

     

     

    =IF(ROW()-ROW(A$1) = 0,
        A$17,
        IF(ROW()-ROW(A$1)+1 = ROWS(A$1:A$17), A$1, A1)
    )
    • Excel's avatar
      Excel
      Iron Contributor
      Sir can you please explain the formula?
      Please..??
      • Lorenzo's avatar
        Lorenzo
        Silver Contributor
        Revised the formula with something easier given what you want to achieve

Resources