Benefits released by year and Month

anawarulhassan

New Member
Joined
Oct 17, 2018
Messages
10
Hi All,

I am working on file which has benefits start date for example 01/01/17 and finish date of 30/04/7 with a benefit value $10,000 and in other cases start date 01/10/17 an end date 30/10/18 Benefit value $12,000.

I am trying to capture cost by year and month on pro rata basis. So I can check how much benefit was realised in April 2018 but only for 2018 related period.

Advance thanks for your help.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I am not sure exactly what you require; two different approaches are shown.
Extend the formulas and dates to the right as required.


Excel 2010
BCDEF
1Version 1
2StartStopAmtJan-17Feb-17
301-Jan-1730-Apr-1710,000.002,583.332,333.33
401-Oct-1731-Oct-1812,000.0000.00
5
6Version 2MonthsPer Month20172018
742,500.0010,000.000
813923.082,769.239,230.77
9
10Dates in row 3 are like Jan 1 2017.
11Dates in row 6 are like Dec 31, 2017.
7aa (2)
Cell Formulas
RangeFormula
E3=MAX(0, MIN($C3, EOMONTH(E$2, 0)) - MAX($B3, E$2) + 1) * $D3 / ($C3 - $B3 + 1)
E4=MAX(0, MIN($C4, EOMONTH(E$2, 0)) - MAX($B4, E$2) + 1) * $D4 / ($C4 - $B4 + 1)
E7=DATEDIF($B3,MIN($C3+1,E$6+1),"m")*D7
E8=DATEDIF($B4,MIN($C4+1,E$6+1),"m")*D8
F3=MAX(0, MIN($C3, EOMONTH(F$2, 0)) - MAX($B3, F$2) + 1) * $D3 / ($C3 - $B3 + 1)
F4=MAX(0, MIN($C4, EOMONTH(F$2, 0)) - MAX($B4, F$2) + 1) * $D4 / ($C4 - $B4 + 1)
C7=DATEDIF(B3,C3+1,"m")
C8=DATEDIF(B4,C4+1,"m")
D7=D3/C7
D8=D4/C8
 
Last edited:
Upvote 0
I am not sure exactly what you require; two different approaches are shown.
Extend the formulas and dates to the right as required.

Excel 2010
BCDEF
Version 1
Version 2MonthsPer Month
Dates in row 3 are like Jan 1 2017.
Dates in row 6 are like Dec 31, 2017.

<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=F3F3F3]#F3F3F3[/URL] , align: center"]Start[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=F3F3F3]#F3F3F3[/URL] , align: center"]Stop[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=F3F3F3]#F3F3F3[/URL] , align: center"]Amt[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]Jan-17[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]Feb-17[/TD]

[TD="align: center"]3[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]01-Jan-17[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]30-Apr-17[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]10,000.00[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CCFFCC]#CCFFCC[/URL] , align: right"]2,583.33[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CCFFCC]#CCFFCC[/URL] , align: right"]2,333.33[/TD]

[TD="align: center"]4[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]01-Oct-17[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]31-Oct-18[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]12,000.00[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CCFFCC]#CCFFCC[/URL] , align: right"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=CCFFCC]#CCFFCC[/URL] , align: right"]0.00[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]2017[/TD]
[TD="align: right"]2018[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"]4[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]2,500.00[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]10,000.00[/TD]
[TD="align: right"]0[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]923.08[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]2,769.23[/TD]
[TD="align: right"]9,230.77[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
7aa (2)

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E3[/TH]
[TD="align: left"]=MAX(0, MIN($C3, EOMONTH(E$2, 0)) - MAX($B3, E$2) + 1) * $D3 / ($C3 - $B3 + 1)[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F3[/TH]
[TD="align: left"]=MAX(0, MIN($C3, EOMONTH(F$2, 0)) - MAX($B3, F$2) + 1) * $D3 / ($C3 - $B3 + 1)[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E4[/TH]
[TD="align: left"]=MAX(0, MIN($C4, EOMONTH(E$2, 0)) - MAX($B4, E$2) + 1) * $D4 / ($C4 - $B4 + 1)[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F4[/TH]
[TD="align: left"]=MAX(0, MIN($C4, EOMONTH(F$2, 0)) - MAX($B4, F$2) + 1) * $D4 / ($C4 - $B4 + 1)[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C7[/TH]
[TD="align: left"]=DATEDIF(B3,C3+1,"m")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D7[/TH]
[TD="align: left"]=D3/C7[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E7[/TH]
[TD="align: left"]=DATEDIF($B3,MIN($C3+1,E$6+1),"m")*D7[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C8[/TH]
[TD="align: left"]=DATEDIF(B4,C4+1,"m")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D8[/TH]
[TD="align: left"]=D4/C8[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E8[/TH]
[TD="align: left"]=DATEDIF($B4,MIN($C4+1,E$6+1),"m")*D8[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Many thanks for prompt reply....I will try to copy what you have done and fingers crossed all be k
 
Upvote 0
re: your additional questions
"I am getting the whole amount in 2018. £10,000 and £12,000 is appearing for both lines respectively and not showing 0 and 9230.77 as you have shown. I simply copied the formula from E7 to F7 and E8 to F8."

a) you can create a distribution similar to the monthly shown above but for years
b) prepare the summary with arithmetic.

" I have one more question, what if I want to show the number as year to date. For example, 01 Oct 17 - 31 Oct 18 but the value for January to July cumulatively as at 31 July 2018 but only for 2018 months.

a) You have the information by month, you can prepare a report and assemble the numbers as you require.
 
Last edited:
Upvote 0

Excel 2010
BCDEFGHI
8StartEndAmount20172018201920202021
901-Jan-1730-Apr-1710,000.0010,000.000.000.000.000.00
1001-Oct-1731-Oct-1812,000.002,787.889,212.120.000.000.00
1101-Jan-1731-Dec-211,826.00365.00365.00365.00366.00365.00
7aaa
Cell Formulas
RangeFormula
E9=MAX(0, MIN($C9, EOMONTH(E$8, 11)) - MAX($B9, E$8) + 1) * $D9 / ($C9 - $B9 + 1)
F9=MAX(0, MIN($C9, EOMONTH(F$8, 11)) - MAX($B9, F$8) + 1) * $D9 / ($C9 - $B9 + 1)
G9=MAX(0, MIN($C9, EOMONTH(G$8, 11)) - MAX($B9, G$8) + 1) * $D9 / ($C9 - $B9 + 1)
H9=MAX(0, MIN($C9, EOMONTH(H$8, 11)) - MAX($B9, H$8) + 1) * $D9 / ($C9 - $B9 + 1)
I9=MAX(0, MIN($C9, EOMONTH(I$8, 11)) - MAX($B9, I$8) + 1) * $D9 / ($C9 - $B9 + 1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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