+ Reply to Thread
Results 1 to 5 of 5

Sorting a list by a set ranking

  1. #1
    Registered User
    Join Date
    09-05-2017
    Location
    San Diego, CA
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    3

    Sorting a list by a set ranking

    I am working on Excel 2010. I have a list of employees and their years of service. I want excel to sort employees by this ranked list.
    So my example:
    A B
    1 Alice
    2 Jane
    3.5 Joe
    4 Bob
    5 Nick
    12 Nancy

    I want to be able to put in a separate part of the sheet those names in a random order and have excel sort them into the ranking I listed above. I did this using the "Custom List" inside Sort but my list of employees is too long.
    So, as a fix I tried then combining the ranking with the name in one cell so "12 Nancy" or "3.5 Bob" but when I asked excel to sort it it sorts it:

    1 Alice
    12 Nancy
    2 Jane
    3.5 Joe
    4 Bob
    5 Nick

    It apparently doesnt recognize the number as distinct from the name.
    Any ideas??? I would prefer to not combine the names and numbers for the sake of appearance but I will do whatever works.
    Attached Images Attached Images

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Sorting a list by a set ranking

    Lucydeford welcome to the forum.

    Since you apparently have large data
    I did this using the "Custom List" inside Sort but my list of employees is too long.
    I would recommend a helper column to avoid resource heavy array formula.

    The helper formula in C2 and filled down ranks the years and breaks "ties".
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in E2 filled down and across until you get blanks.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I also "future proofed" the data by increasing the ranges beyond the actual data range.


    A
    B
    C
    D
    E
    F
    1
    Years
    Name
    Helper
    Rank by Yr
    Name
    2
    1
    Alice
    1.00001
    1
    Alice
    3
    12
    Nancy
    6.00002
    2
    Jane
    4
    2
    Jane
    2.00003
    3.5
    Joe
    5
    3.5
    Joe
    3.00004
    4
    Bob
    6
    4
    Bob
    4.00005
    5
    Nick
    7
    5
    Nick
    5.00006
    12
    Nancy
    Last edited by FlameRetired; 09-05-2017 at 05:34 PM.
    Dave

  3. #3
    Registered User
    Join Date
    09-05-2017
    Location
    San Diego, CA
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    3

    Re: Sorting a list by a set ranking

    Hi Dave,
    So I followed your formulas and it just gave me another sorted list. What I am looking to do is have excel sort the following (example) list:

    Nancy
    Alice
    Jane
    Bob
    Nick
    Joe

    And place them in order according to their rank.

    To make this more clear, I am making a calendar in excel of vacation time. Our vacation time is granted by seniority. So I would like to put a list of names of the people who have requested vacation on a certain day and have excel sort it according to a list I have entered of their years of service.

  4. #4
    Registered User
    Join Date
    09-05-2017
    Location
    San Diego, CA
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    3

    Re: Sorting a list by a set ranking

    Also it is 63 names. If that matters.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Sorting a list by a set ranking

    No. The solution I offered will work.

    With only 63 names you could use an array formula (with ranges limited to the data range) with no ill effects. That would make the helper column unnecessary. It would also make for a longer formula.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    Array entered in D2 filled down and across.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A
    B
    C
    D
    E
    1
    Years
    Name
    Rank by Yr
    Name
    2
    1
    Alice
    1
    Alice
    3
    12
    Nancy
    2
    Jane
    4
    2
    Jane
    3.5
    Joe
    5
    3.5
    Joe
    4
    Bob
    6
    4
    Bob
    5
    Nick
    7
    5
    Nick
    12
    Nancy

+ 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. [SOLVED] Create an automatically sorting/ranking list
    By dip11 in forum Excel General
    Replies: 11
    Last Post: 09-14-2012, 06:53 AM
  2. Ranking/Sorting
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-13-2012, 10:53 AM
  3. Ranking and Sorting
    By ChrisKader in forum Excel General
    Replies: 4
    Last Post: 10-31-2010, 11:21 AM
  4. Sorting and Ranking Events
    By rdusseau in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-08-2008, 12:17 PM
  5. Sorting & Ranking
    By etsusurveyor in forum Excel General
    Replies: 1
    Last Post: 12-11-2007, 05:47 PM
  6. [SOLVED] sorting and ranking
    By Megan in forum Excel General
    Replies: 2
    Last Post: 06-24-2006, 02:30 AM
  7. [SOLVED] ranking or sorting
    By Liz23 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2005, 04:06 PM
  8. [SOLVED] Ranking/Sorting more than 3 row's
    By chris in forum Excel General
    Replies: 1
    Last Post: 02-02-2005, 06:06 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