Apportion a value by day rate across months from a start and end date?

mountainman88

Board Regular
Joined
Jun 22, 2019
Messages
109
Office Version
  1. 2016
Platform
  1. Windows
Hi folks,

What is a formula I can put in cell D2 and drag across to cell O2 which will take the value in cell C1 and apportion by day (start date minus end date, inclusive of both) to the appropriate month?

1674152879774.png


Thanks!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
You might try this formula. I think it is what you seek. There may be better ways, but this seems to work (and accounts for years as well as months so if the start and end dates weren't in the same year).

=IF(AND(EOMONTH($A2,0)<=D1,EOMONTH($B2,0)>=D1),$C2/(1+YEAR($B2)*100+MONTH($B2)-YEAR($A2)*100-MONTH($A2)),0)
 
Upvote 0
Sorry. My previous formula went by month. I think this is more what you seek. It calculates a daily value and then multiplies by the number of days within the months range (so 24 days for much, all of April and May, and 19 days for June).

=IF(OR(EOMONTH($A2,0)>D1,EOMONTH($B2,0)<D1),0,($C2/DAYS($B2,$A2-1))*IF(EOMONTH($A2,0)=D1,DAY(D1)-DAY($A2)+1,IF(EOMONTH($B2,0)=D1,DAY($B2),DAY(D1))))
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,214,589
Messages
6,120,415
Members
448,960
Latest member
AKSMITH

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