Break Revenue Down By Month - Start End Date and Amount

footballdj123

New Member
Joined
Apr 5, 2018
Messages
8
Hello,

I have two dates and an amount field, I want to break the revenue into each month. I have a formula

=(IF(AND($B2>=D$1,$A2<=DATE(YEAR(D$1),MONTH(D$1)+1,0)),MIN($B2,DATE(YEAR(D$1),MONTH(D$1)+1,1))-MAX($A2,D$1),0)/($B2-$A2))*$C2

It breaks down the revenue incorrectly across the months. I took the value and look at it daily and it was slightly off. The total amount does match up, just not how its weighted into each month.

Any idea why?

[TABLE="width: 1223"]
<colgroup><col span="2"><col><col span="6"><col span="3"><col span="7"></colgroup><tbody>[TR]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[TD]Amount[/TD]
[TD]4/1/2018[/TD]
[TD]5/1/2018[/TD]
[TD]6/1/2018[/TD]
[TD]7/1/2018[/TD]
[TD]8/1/2018[/TD]
[TD]9/1/2018[/TD]
[TD]10/1/2018[/TD]
[TD]11/1/2018[/TD]
[TD]12/1/2018[/TD]
[TD]1/1/2019[/TD]
[TD]2/1/2019[/TD]
[TD]3/1/2019[/TD]
[TD]4/1/2019[/TD]
[TD]5/1/2019[/TD]
[TD]6/1/2019[/TD]
[TD]7/1/2019[/TD]
[/TR]
[TR]
[TD]5/18/2018[/TD]
[TD]6/15/2018[/TD]
[TD]4250[/TD]
[TD]$0[/TD]
[TD]$2,125[/TD]
[TD]$2,125[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[/TR]
[TR]
[TD]11/19/2018[/TD]
[TD]12/16/2018[/TD]
[TD]0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[/TD]
[TD]$0[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TD]$3,906[/TD]
[TD]$4,324[/TD]
[TD]$4,185[/TD]
[TD]$4,324[/TD]
[TD]$4,185[/TD]
[TD]$4,324[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Maybe...

=IF(AND($B2>=D$1,$A2<=DATE(YEAR(D$1),MONTH(D$1)+1,0)),MIN($B2,EOMONTH(D$1,0))-MAX($A2,D$1-1),0)*$C2/($B2-$A2)

M.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
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