Get 100 first records by criterium formula

JBlack

New Member
Joined
Sep 13, 2014
Messages
1
Hello!


I'm struggling with the following problem.
I have a long list of data like this:
IDNameCityTelephoneNo. CustomersSales
1EmilyCity123456789077812,123
2AndrewCity12345678896678

<tbody>
</tbody>



What I want to do is to get 100 people (Name, City, Telephone), whose ration of Sales to Customers is the biggest.
In this case it would be Andrew.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
The easiest way would be to create another two columns, one in which you store the ratio(call it e.g. ratio) and the other one for ranking (e.g. rank).
Then follow these steps:
1. In the column ratio calculate the ratio. Apply it to all rows.
2. In the column rank paste this formula:
(Suppose your ratio is in the 7th column and starts from the second row)
Code:
=RANK(G2,$G$2:$G$[last_row_number])+COUNTIF($G$2:G2,G2)-1
Apply to all your rows.
3. Now, in the place, where you want to have the results the following and drag it for 100 rows.

  • In the name column paste this:
Code:
=INDEX($B$2:$B$[last_row_number],MATCH(ROW(1:1),$G$2:$G$[last_row_number],0))

  • In the city column paste this:
Code:
=INDEX($C$2:$C$[last_row_number],MATCH(ROW(1:1),$G$2:$G$[last_row_number],0))

  • And in the telephone column this:
Code:
=INDEX($D$2:$D$[last_row_number],MATCH(ROW(1:1),$G$2:$G$[last_row_number],0))


Hope that helps! :biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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