Need a ranking formula which minus out dates in another column

Cosmic Wizard

Board Regular
Joined
Apr 6, 2015
Messages
112
Hello there,
This is a tough questions, but basically i need ranking formula which can minus off a numbers.
I have these demountables under contract and when we go over 48, we have to pay more.
But we also remove demountables, so we can go back under 48.
We are not sure when we should have been charge for the extra demountables, and we have many contacts and sites.
What i need is a a count which minus off a demountable when it is remove.

Any help would be greatly appreciated, as i am truly struck here. Thankyou!



<colgroup><col><col><col span="2"><col span="2"></colgroup><tbody>
</tbody>

Placement Rank 1True RankRemovalRank 2
5-Feb-97120-Oct-0868
27-Oct-9926-Aug-077
5-Nov-99317-Oct-0866
17-Apr-0046-Oct-0862
29-Mar-01513-Oct-0863
21-Aug-01614-Oct-0865
20-May-02730-Jan-034
20-May-02714-Jan-031
20-May-02730-Jan-034
20-May-02714-Jan-031
23-May-021114-Jan-031
18-Dec-021213-Oct-0863
11-Jan-031320-Oct-0868
1-May-031417-Oct-0866
2-Sep-051527-Dec-0738
2-Sep-051516-Dec-0710
2-Sep-051517-Dec-0715
3-Sep-051829-Dec-0748
3-Sep-051830-Dec-0751
3-Sep-051828-Dec-0746
3-Sep-051826-Dec-0734
3-Sep-051827-Dec-0738
3-Sep-051827-Dec-0738
6-Sep-052431-Dec-0753
6-Sep-052420-Dec-0719
6-Sep-052420-Dec-0719
6-Sep-052426-Dec-0734
6-Sep-052426-Dec-0734
7-Sep-05294-Jan-0860
8-Sep-05302-Jan-0856
8-Sep-053028-Dec-0746
8-Sep-05303-Jan-0859
8-Sep-053031-Dec-0753
9-Sep-053418-Nov-078
9-Sep-053419-Dec-0718
9-Sep-053429-Dec-0748
9-Sep-053430-Dec-0751
10-Sep-053817-Dec-0715
10-Sep-053829-Dec-0748
12-Sep-054027-Dec-0738
12-Sep-054031-Dec-0753
12-Sep-05404-Jan-076
12-Sep-054027-Dec-0738
12-Sep-054016-Dec-0710
12-Sep-054027-Dec-0738
13-Sep-054622-Dec-0726
13-Sep-054620-Dec-0719
13-Sep-054620-Dec-0719
13-Sep-054626-Dec-0734
14-Sep-055016-Dec-0710
14-Sep-055023-Dec-0729
14-Sep-055023-Dec-0729
14-Sep-055023-Dec-0729
15-Sep-055416-Dec-0710
15-Sep-055421-Dec-0725
16-Sep-055620-Dec-0719
16-Sep-055615-Dec-079
17-Sep-055817-Dec-0715
17-Sep-055824-Dec-0732
17-Sep-055824-Dec-0732
17-Sep-05582-Jan-0856
17-Sep-05582-Jan-0856
19-Sep-056320-Dec-0719
19-Sep-056322-Dec-0726
19-Sep-056316-Dec-0710
19-Sep-056322-Dec-0726
20-Sep-05677-Jan-0861
21-Sep-056827-Dec-0738
21-Sep-056827-Dec-0738
22-Sep-057015-Dec-079
22-Sep-057017-Dec-0715
24-Sep-057223-Dec-0729
28-Sep-05732-Jan-0856
4-Jan-067413-Oct-0863
6-Aug-077520-Oct-0868
29-Jan-0876
26-Feb-0877
6-Mar-08786-Oct-0862
19-Sep-0879
9-Jan-0980
5-Mar-0981
18-Jan-1082
23-Jan-10837-Jul-10
23-Jan-10838-Jul-10
23-Jan-10838-Jul-10
7-Jul-1086
8-Jul-1087
11-Jan-1188
11-Jan-1188
11-Jan-1188
1-Jul-1191
8-Dec-1192
8-Dec-1192
8-Dec-1192
8-Dec-1192
16-Dec-1196
6-Jan-1297

<colgroup><col span="2"><col span="2"><col span="2"></colgroup><tbody>
</tbody>
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Got it, or with a really ugly solutions.

There are three columns with formulas in them.

First you rank the placements in terms of date =RANK(A2,$A$2:$A$277,1)

Then in the next column you use a countif to find out how many demountables have been removed before your placement =COUNTIF($D$2:$D$277,"<"&A2)

Then it a simple matter of using the sum =SUM(B1-C1). This well get you your placement rank minus any demountable removed.

I have no doubt there are easily ways of doing this, but his works so brilliant!!
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

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