Rank if value meets a condition

BJE1

New Member
Joined
Mar 24, 2010
Messages
4
I'm trying to create a formula that ranks contract values, but only considers active contracts. Column A is the contract status (active/inactive), column B is the contract value, and column C would be the rank. If the contract is "inactive", I would want the rank to be null - such that if there were 1000 contracts and 500 were active, they would be ranked 1 - 500 and the inactive contracts wouldn't have rankings at all.

Any ideas?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
i think this: ( my english is very poor)
C1=IF(A1<>"active","",SUMPRODUCT((A$1:A$600="active")*(B$1:B$600>B1))+1)
 
Upvote 0
Further to what wangyuhu has suggested, if you have Excel 2007 or later there is a more efficient formula. It also depends on whether your rank #1 is to be the highest or lowest value. Anyway, this should give you something to go on.

Excel Workbook
ABCD
1StatusValueRank 2007+Rank 2003-
2Inactive5  
3Active811
4Active633
5Active355
6Inactive5
7Active444
8Active355
9Inactive5
10Active811
11
Rank
 
Upvote 0
That's brilliant! Had to study it a bit before the lightbulb went off and I figured out what the formulas everyone suggested were doing. Thanks again!
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

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