Cost Spread Equally between dates

rafaelgilardino

New Member
Joined
Nov 16, 2018
Messages
3
Hi all,

I'm struggling for a quite while trying to create formula that split monthly equally cost based on min & max dates from a range.

Image of my table can be found below:
https://imgur.com/a/6lfa9D7

The idea is spread row values among the min & max dates of red square

Any help will be very much appreciated and will save my job :LOL:
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,

In your cell F4 ... you can test following formula :

Code:
=ROUND($C4*MAX(0,NETWORKDAYS(MAX($D4,F$2),MIN($E4,EOMONTH(F$2,0))))/NETWORKDAYS($D4,$E4),2)

Hope this will help
 
Upvote 0
Hi all,

I'm struggling for a quite while trying to create formula that split monthly equally cost based on min & max dates from a range.

The idea is spread row values among the min & max dates of red square

In the example below ideally row 11 should be identified as longer task (lasting until column M) and cost of rows from 3 to 10 to be split equally between F until M

Identification can be a problem however just the split would already be a huge help

Table:
ABCDEFGHIJKLM
1CR IDTask NameCostStartFinishAug-19Sep-19Oct-19Nov-19Dec-19Jan-20Feb-20Mar-20
2AMDOCSFIN-91Blindagem Final Solution + Double Play/Facilities APPs$1,204.758/21/20194/25/2020
3OMS$279.208/21/20192/16/202015.6446.9348.5046.9348.50---
4ODS$272.228/21/20192/11/202015.6446.9348.5046.9348.5048.5017.21-
5MEC$80.278/21/201910/11/201915.7447.2217.31-----
6MCSS$101.218/21/201910/25/201915.5746.7138.93-----
7Invoicing$217.088/21/201912/29/201916.7050.1051.7750.1048.43---
8AmDD$52.358/21/20199/23/201915.8636.49------
9CM$17.458/21/20199/10/20198.738.73------
10WOL$76.788/21/201911/17/20198.7326.1827.0514.83----
11MCO$108.198/22/20194/25/20203.9413.1413.5813.1413.5813.5812.7013.58
124236Alavancagem Ebilling$604.8210/25/20198/23/2020
13OMS$20.9410/25/201911/7/2019--9.6611.28----
14CRM$213.9410/25/20193/10/2020--9.3746.8548.4148.4145.2915.62
15MCSS$230.3410/25/20193/20/2020--9.4047.0148.5848.5845.4431.34
16AR$34.9010/25/201911/16/2019--9.5225.38----
17Invoicing$52.3512/29/20191/31/2020----3.1749.18--
18MCO$52.354/26/20208/23/2020--------

<tbody>
</tbody>

Any help will be very much appreciated and will save my job :LOL:

Hi,

In your cell F4 ... you can test following formula :

Code:
=ROUND($C4*MAX(0,NETWORKDAYS(MAX($D4,F$2),MIN($E4,EOMONTH(F$2,0))))/NETWORKDAYS($D4,$E4),2)

Hope this will help

I'm not sure why but I'm not getting any value.

As I could understand from the formula there is no reference for the month of start & ending of each task, how will it be allocated along the months?<style type="text/css"> table.tableizer-table { font-size: 12px; border: 1px solid #CCC ; font-family: Arial, Helvetica, sans-serif; } .tableizer-table td { padding: 4px; margin: 3px; border: 1px solid #CCC ; } .tableizer-table th { background-color: #104E8B ; color: #FFF ; font-weight: bold; }</style><style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC ;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC ;
}
.tableizer-table th {
background-color: #104E8B ;
color: #FFF ;
font-weight: bold;
}
</style>
 
Upvote 0
Hello,

Please check what you have in your cells F1 to M1 ...

My recommendation for cell F1 : = date(2019,8,1)

And in cell G1 : =EDATE(F1,1)

which can be copied to all your columns ...

Hope this will help
 
Upvote 0
Hello,

Please check what you have in your cells F1 to M1 ...

My recommendation for cell F1 : = date(2019,8,1)

And in cell G1 : =EDATE(F1,1)

which can be copied to all your columns ...

Hope this will help

I've got some progress however still missing crucial part of splitting it by the min & max dates from the interval. For instance dates from row 11 should be consider as min & max and rows between 3>10 should be equally split between row 11 dates.

Also the split are not equal we have different numbers between the months

result below:
ABCDEFGHIJKLM
1CR IDTask NameCostStartFinishAug-19Sep-19Oct-19Nov-19Dec-19Jan-20Feb-20Mar-20
2AMDOCSFIN-91 Blindagem Final Solution + Double Play/Facilities APPs$1,204.758/21/20194/25/2020
3 OMS$279.208/21/20192/16/2020 17.45 45.81 50.17 45.81 47.99 50.17 21.81 -
4 ODS$272.228/21/20192/11/2020 17.42 45.73 50.09 45.73 47.91 50.09 15.24 -
5 MEC$80.278/21/201910/11/2019 16.90 44.36 19.01 - - - - -
6 MCSS$101.218/21/201910/25/2019 16.87 44.28 40.06 - - - - -
7 Invoicing$217.088/21/201912/29/2019 18.67 49.02 53.69 49.02 46.68 - - -
8 AmDD$52.358/21/20199/23/2019 17.45 34.90 - - - - - -
9 CM$17.458/21/20199/10/2019 9.31 8.14 - - - - - -
10 WOL$76.788/21/201911/17/2019 9.75 25.59 28.03 13.41 - - - -
11 MCO$108.198/22/20194/25/2020 4.28 12.84 14.06 12.84 13.45 14.06 12.22 13.45

<tbody>
</tbody>
 
Upvote 0
Hello,

If my understanding is correct ... the function seems to return the splits you wanted ... :)

Why are the amounts not identical from a month to another ... and your Start and Finish Dates can fall at any point in time in any month ...

Do no forget that the Networkdays function is excluding the Week-Ends ...

Hope this clarifies

Because the number of working days in each and every month is not always the same ...
 
Upvote 0

Forum statistics

Threads
1,215,754
Messages
6,126,680
Members
449,328
Latest member
easperhe29

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