Designate Range based on Criteria

narramist

New Member
Joined
Jan 28, 2014
Messages
14
Let's say I have a table that lists fruit in one column, and quantity in another:

FruitQuantityRank
Apple3
Orange5
Pear2
Apple6

<tbody>
</tbody>

I'm looking to build a third column that designates the line's rank by quantity per fruit. So apples are only ranked against other apples, pears against pears and so on. So far, if I use RANK(B1, B:B), I rank all quantities regardless of fruit type.

Presuming my table has many more lines than above, how can I designate the range in the RANK formula to say: all cells in column B that have the same value in column A?

In the above examples, the Rank column would list, in descending order: 2, 1, 1, 1.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,215,861
Messages
6,127,383
Members
449,382
Latest member
DonnaRisso

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