Results 1 to 8 of 8

Reorder a list using a formula

This is a discussion on Reorder a list using a formula within the Excel Questions forums, part of the Question Forums category; Hi, I figure this is easy, but I can't figure out how to do it ... I have a 2 ...

  1. #1
    Board Regular Lincoln Six Echo's Avatar
    Join Date
    Aug 2008
    Location
    Toronto
    Posts
    92

    Default Reorder a list using a formula

    Hi,

    I figure this is easy, but I can't figure out how to do it ...

    I have a 2 columns list (10 rows or so). I would like to reorder the items in a separate list using a formula. (order based on 2nd colum)

    Let me know

    Thanks!
    Alex


    Original:
    Canada -- 4%
    USA --10%
    Germany --20%
    UK -- 7%

    Desired Output:
    Germany --20%
    USA --10%
    UK --7%
    Canada -- 4%

  2. #2
    Board Regular
    Join Date
    Jul 2002
    Location
    Milton Keynes, England
    Posts
    10,945

    Default Re: Reorder a list using a formula

    Can you have a third column of calcs next to the original 2 column list? ( to rank the list )
    Cheers, Glenn.

    Beauty is in the eye of the beer-holder.

  3. #3
    Board Regular
    Join Date
    Jan 2003
    Location
    CA, Bay Area
    Posts
    2,062

    Default Re: Reorder a list using a formula

    Is there a reason why the original must stay in the order it is in? If yes, then merely create a 3rd column assigning each country a hierarchy/sort value. In this case, there is no need to create another list nor any formulas. Merely use the sort feature to switch the original list back and forth between country-priority and percentage values.

    Using RANK will only duplicate what is already accomplished by the percentage column.

    If there is not a reason that the original must stay in a particular order, then no need to add anything. Just enable sorting. If you sort on country, the list will be sorted alphabetically. if you sort on percent, well, you get the idea.
    Last edited by nbrcrunch; Dec 30th, 2008 at 10:37 AM.
    Give a man a fish & you've fed him once. Teach a man to fish & you feed him for a lifetime. Give a man a fish a day & he becomes a spoiled adult still living with his parents at 35.

  4. #4
    New Member
    Join Date
    Dec 2008
    Posts
    2

    Default Re: Reorder a list using a formula

    I use a similar thing. I recorded a macro for it though. I went to record macro, then I did a sort for the columns and stopped the macro. I then assigned it to a square shape. So when I click it, it re-categorizes automatically with one click form then on. I dont know if that will help you any.

  5. #5
    Board Regular Lincoln Six Echo's Avatar
    Join Date
    Aug 2008
    Location
    Toronto
    Posts
    92

    Default Re: Reorder a list using a formula

    The original must stay in that order, unfortunately.

    I did try rank as some of you suggested and it worked. I added the RANK in a 3rd column, and where I want my final table, I used a VLOOKUP to get the value & 'labels' for rank #1, 2, etc. It works.

    Thanks,

  6. #6
    Board Regular
    Join Date
    Jul 2002
    Location
    Milton Keynes, England
    Posts
    10,945

    Default Re: Reorder a list using a formula

    Quote Originally Posted by Lincoln Six Echo View Post
    The original must stay in that order, unfortunately.

    I did try rank as some of you suggested and it worked. I added the RANK in a 3rd column, and where I want my final table, I used a VLOOKUP to get the value & 'labels' for rank #1, 2, etc. It works.

    Thanks,
    ... as long as you don't have duplicates that will work fine.
    Cheers, Glenn.

    Beauty is in the eye of the beer-holder.

  7. #7
    Board Regular Lincoln Six Echo's Avatar
    Join Date
    Aug 2008
    Location
    Toronto
    Posts
    92

    Default Re: Reorder a list using a formula

    Yeah ... I thought about that. But fortunately, my values have 10 decimals and duplicates are nearly impossible.

  8. #8
    Board Regular
    Join Date
    Jul 2002
    Location
    Milton Keynes, England
    Posts
    10,945

    Default Re: Reorder a list using a formula

    That's great. Glad you got a solution.
    Cheers, Glenn.

    Beauty is in the eye of the beer-holder.

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com