Kevin Neufeld

Board Regular
Joined
Oct 6, 2014
Messages
50
Hello,
I have a data set similar to below. Each lane ID has a base price that I am paying now. I have had suppliers return bids and I have ranked them compared to the base. Column D has the formula =countifs(a:a,a2,C:C,"<"&c2)+1 this allows the formula to be filled down column D but when the lane id changes the ranking resets and only compares by the lane id.

However the issue is when suppliers have the same rate the ranking is skewed. For example I would like Lane ID #1 rankings to show up like this: 1,2,3,4,5. There are 7 rates returned but due to same rates, I should only have 5 rankings. I am missing rankings with my formula.

Thanks

ABCD
1
Lane IDSupplierRateRank
21Base Price8461
31A9902
41B9902
51C10004
61D12005
71E12005
81F13007
92A5001
102B5001
112C7503
122BASE PRICE10004
132D10004
142E12006
153A2001
163B2502
173BASE PRICE5003
183D5003
193E7505
203F7505

<tbody>
</tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I think I understood correctly. Try this. I included a second way to calculate a 'Rank with Conditions' (using function SUMPRODUCT) in case you need to mess round with arrays, which function COUNTIFS doesn't chew very well.

The column 'Duplicate Continuous Rank' is what I think you're after. [Source: http://www.tushar-mehta.com/excel/newsgroups/ranking/index.html]

Copy D2 to F2 down as needed.

ABCDEF
1Lane IDSupplierRateRank1Rank2Duplicate Continuous Rank
21Base Price846111
31A990222
41B990222
51C1000443
61D1200554
71E1200554
81F1300775
92A500111
102B500111
112C750332
122BASE PRICE1000443
132D1000443
142E1200664
153A200111
163B250222
173BASE PRICE500333
183D500333
193E750554
203F750554

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet38

Worksheet Formulas
CellFormula
D2=COUNTIFS(A:A,A2,C:C,"<"&C2)+1
E2=SUMPRODUCT(--($A$2:$A$20=A2),--(C2>$C$2:$C$20))+1

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
F2{=SUM(IFERROR(1/COUNTIFS($A$2:$A$20,A2,$D$2:$D$20,IF(($D$2:$D$20<D2)*($A$2:$A$20=A2),$D$2:$D$20)),0))+1}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try to enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
I recreated the table the exact same has you have below. In column F from Row 2 to row 8 i get 6 in every cell. from row 9 to 20 i get a 5 in every column .



I think I understood correctly. Try this. I included a second way to calculate a 'Rank with Conditions' (using function SUMPRODUCT) in case you need to mess round with arrays, which function COUNTIFS doesn't chew very well.

The column 'Duplicate Continuous Rank' is what I think you're after. [Source: http://www.tushar-mehta.com/excel/newsgroups/ranking/index.html]

Copy D2 to F2 down as needed.

ABCDEF
1Lane IDSupplierRateRank1Rank2Duplicate Continuous Rank
21Base Price846111
31A990222
41B990222
51C1000443
61D1200554
71E1200554
81F1300775
92A500111
102B500111
112C750332
122BASE PRICE1000443
132D1000443
142E1200664
153A200111
163B250222
173BASE PRICE500333
183D500333
193E750554
203F750554

<tbody>
</tbody>
Sheet38

Worksheet Formulas
CellFormula
D2=COUNTIFS(A:A,A2,C:C,"<"&C2)+1
E2=SUMPRODUCT(--($A$2:$A$20=A2),--(C2>$C$2:$C$20))+1

<tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
F2{=SUM(IFERROR(1/COUNTIFS($A$2:$A$20,A2,$D$2:$D$20,IF(($D$2:$D$20<d2< font="">)*($A$2:$A$20=A2),$D$2:$D$20</d2<>)),0))+1}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try to enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
You must have failed to properly enter the formula. The Array formula requires entry with
Ctrl+Shift+Enter.
 
Upvote 0

Forum statistics

Threads
1,214,874
Messages
6,122,036
Members
449,062
Latest member
mike575

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