Reorder a list using a formula

Lincoln Six Echo

Board Regular
Joined
Aug 8, 2008
Messages
92
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%
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Can you have a third column of calcs next to the original 2 column list? ( to rank the list )
 
Upvote 0
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:
Upvote 0
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.
 
Upvote 0
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,
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,640
Members
448,974
Latest member
DumbFinanceBro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top