+ Reply to Thread
Results 1 to 4 of 4

Sorting with a formula

  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    Netherlands
    MS-Off Ver
    Office 365 (2013)
    Posts
    268

    Sorting with a formula

    Hey there,

    After working with excel for a while, handling things without any problems... I came to a new problem.
    I have values in 5 columns and 10 rows.

    I want to sort the values in column 2. (at the moment they contain. 0-0-0-0-0-0-1-2-0-2.
    column 1, should move accordingly.
    - the other colums are based on formulas, so thats not a problem

    So... it should not be that difficult,.. but I cannot get it done -.-
    It does not even matter what value 2 or value 0 is taken first

    I'll try uploading an example in a bit.
    example.xlsx
    Last edited by Evolta; 04-30-2015 at 08:58 AM. Reason: uploaded

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Sorting with a formula

    B18=INDEX(B$4:B$13,MATCH(LARGE(INDEX($C$4:$C$13+(10^-8)/ROW(C$4:C$13),0),ROW(A1)),INDEX($C$4:$C$13+(10^-8)/ROW(C$4:C$13),0),0))
    try this and copy across
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Contributor
    Join Date
    09-02-2013
    Location
    Netherlands
    MS-Off Ver
    Office 365 (2013)
    Posts
    268

    Re: Sorting with a formula

    Great :D I just figured out myself how to sort the column itself with large, but was not sure how to go on from there.
    Translated it to dutch and replaced the , with ; and it works wonderful.

    What I do not understand yet is why you add 10^-8 (in $C$4:$C$13+(10^-8))
    Is that to convert it to a number but since its a pointlessly small number it doesn't change anything?


    -edit-.. ow wait... I simply do not understand that index part at all, give me a while
    Last edited by Evolta; 04-30-2015 at 09:24 AM.

  4. #4
    Forum Contributor
    Join Date
    09-02-2013
    Location
    Netherlands
    MS-Off Ver
    Office 365 (2013)
    Posts
    268

    Re: Sorting with a formula

    Correct me if I'm wrong...
    Took me a while to see what was going on... But INDEX($C$4:$C$13+(10^-8)/ROW(C$4:C$13);0) adds a very small number to each cell.
    Since its a number <1 (and very small since it should not influence the results) and devision is used, it makes sure the ranking is maintained top down.

    So I think I figured out why,... now I'll try to really understand the how so I can reproduce these kind of formulas

    -edit-
    got it hopefully I can help other with this
    Last edited by Evolta; 04-30-2015 at 10:11 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Implement sorting text cells using array formula in the current formula.
    By archangel9999 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-19-2014, 06:42 AM
  2. Sorting formula
    By jyothijayanna in forum Excel General
    Replies: 1
    Last Post: 02-09-2014, 11:39 AM
  3. Need formula instead of sorting
    By JK1234 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-06-2010, 04:08 PM
  4. Sorting using Formula
    By da80th in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-11-2008, 09:09 AM
  5. Sorting formula?
    By crestars in forum Excel General
    Replies: 3
    Last Post: 03-08-2006, 04:19 PM

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