+ Reply to Thread
Results 1 to 5 of 5

Formula for sorting table by numbers

  1. #1
    Registered User
    Join Date
    08-22-2010
    Location
    Zagreb, Croatia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Unhappy Formula for sorting table by numbers

    Hello!

    I'm new here and not very good in english so I hope I will explain my problem well.

    Generally, I need an array formula to sort table by numbers. Let's say I have numbers in cells (A1:A15) and text in cells (B1:B15), and need to sort table (A1:B15) by numbers in column (A1:A15) using dynamic array formula. I found a formula for sorting numbers only, but can't figure out how can I sort associated text also.. Array formula for sorting numbers would look like this:

    (I choose cells C1:C15 and write folowing formula in formula bar)
    =SMALL(A1:A15;ROW(INDIRECT("1:"&ROWS(A1:A15))))
    (Then I press ctrl+shift+enter to add array formula)

    I get sorted column (A1:A15) in cells (C1:C15), but I need to get column (B1:B15) in cells (D1:D15) also, sorted by numbers from (A1:A15)

    I would be very gratefull if someone could help me to figure out how can I include text from (B1:B15) into that dynamic sorting array formula!

    Best regards
    Attached Files Attached Files
    Last edited by Alleen86; 08-22-2010 at 10:19 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula for sorting table by numbers

    you probably don't need that array post a sample worksheet
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-22-2010
    Location
    Zagreb, Croatia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Formula for sorting table by numbers

    sorry, I just wanted to be clear about what my problem is because I'm not sure of my english..

    I hope that attachment is not a problem, I'm very sorry if it is..

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula for sorting table by numbers

    you can rank unique then index/match you have no tie break to determine if = who comes first though
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-22-2010
    Location
    Zagreb, Croatia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Formula for sorting table by numbers

    Thank you very much!

    I think it will work!

    Thank you,

    Dejan

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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