+ Reply to Thread
Results 1 to 8 of 8

Replacing sorted values with 1,2,3 etc

  1. #1
    Registered User
    Join Date
    12-22-2014
    Location
    London
    MS-Off Ver
    20163
    Posts
    13

    Replacing sorted values with 1,2,3 etc

    On the spreadsheet I have attached, if you go to the 'RATIO' tab and then look at the column called 'TREND' on the far right... it is ordered by value from smallest to largest. However, I would like to replace all the values in this column by 1,2,3 etc based on the smallest value classified as number 1, the 2nd smallest as number 2 etc.

    How can I do this without having to type the 1,2,3 etc myself? Thank you!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,996

    Re: Replacing sorted values with 1,2,3 etc

    Can you attach your spreadsheet?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    12-22-2014
    Location
    London
    MS-Off Ver
    20163
    Posts
    13

    Re: Replacing sorted values with 1,2,3 etc

    Sorry I thought I had, hopefully this time it has worked
    Attached Files Attached Files

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Replacing sorted values with 1,2,3 etc

    Try in AE2

    =SMALL(INDEX($AB$2:$AB$25+$AD$2:$AD$25,),ROWS($1:1))
    Quang PT

  5. #5
    Registered User
    Join Date
    12-22-2014
    Location
    London
    MS-Off Ver
    20163
    Posts
    13

    Re: Replacing sorted values with 1,2,3 etc

    Thanks, but I would like the values to be from 1 to 24, so the smallest value in column AE would show as "1", the 2nd smallest would show "2" and the highest value would show as "24". Then the football club in column A could be sorted by the value in column AE so that for example the club with best trend would be Bournemouth in the above example. Then I could note down Bournemouth are 1, Millwall are 24 and all inbetween.

    Sorry for not explaining it well (:
    Last edited by motorcycle; 03-14-2015 at 03:59 PM.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Replacing sorted values with 1,2,3 etc

    Wow that is really hard on the eyes with all those colors

    I would just use your currect column AE as a helper and then use this in AF, copied down...
    =RANK(AE2,$AE$2:$AE$25,1)

    If you dont want duplicate ranks, theu use this instead...
    =RANK(AE2,$AE$2:$AE$25,1)+COUNTIF($AE$2:$AE$25,AE2)-1
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Registered User
    Join Date
    12-22-2014
    Location
    London
    MS-Off Ver
    20163
    Posts
    13

    Re: Replacing sorted values with 1,2,3 etc

    That worked and is just what I wanted, thanks.

    I find an all-white screen hard on my eyes so have lots and lots of colours everywhere as it is easier for me to look at for a long time.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Replacing sorted values with 1,2,3 etc

    whatever works for you Im happy I was able to help

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. Replies: 2
    Last Post: 03-07-2015, 08:17 PM
  2. Replies: 1
    Last Post: 03-06-2015, 09:54 PM
  3. Replies: 0
    Last Post: 03-06-2015, 03:07 PM
  4. Replies: 0
    Last Post: 03-06-2015, 12:43 PM
  5. [SOLVED] Get unique values sorted
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-01-2015, 08:40 AM

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