Revenue allocation by month based on start and end date

alexbarrow

New Member
Joined
Jul 29, 2019
Messages
3
Hello All!

Thanks for all of the wonderful posts here, got pretty far with this but got stuck on a few things. Trying to create a formula to allocated revenue over months based on the start and end date of a project. The goal would be to distribute revenue appropriately based on these dates.

Everything was working great with my formula until things entered into a new year where my formula stopped working and is pulling inaccurate results. The formula also doesn't work if the project time extends from one year to the next.

Anyone know a workaround? Open to different solutions to accomplish the same basic thing which is allocating revenue based on the start and end dates across multiple months as a portion of the total fee.

Studio Tracker - Sample Data.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1
2FEEWEEKSSTARTENDDAILY12/31/211/31/222/28/223/31/224/30/225/31/226/30/227/31/228/31/229/30/2210/31/2211/30/2212/31/221/31/232/28/233/31/234/30/235/31/236/30/237/31/238/31/239/30/2310/31/2311/30/2312/31/231/31/242/1/24
3$ 100,000205/5/229/22/22$ 714.29 $ 18,571.43$ 21,428.57$ 22,142.86###################### ##############################
Sheet1
Cell Formulas
RangeFormula
E3E3=D3+C3*7
F3F3=IFERROR(B3/C3/7,"")
H3:AG3H3=IF(AND(MONTH($D3)=MONTH(H$2),YEAR($D3)=YEAR(H$2),MONTH($E3)=MONTH(H$2),YEAR($E3)=YEAR(H$2)),$B3,IF(AND(MONTH($D3)=MONTH(H$2),YEAR($D3)=YEAR(H$2),MONTH($E3)<>MONTH(H$2)),(H$2-$D3)*$F3,IF(AND(MONTH($D3)<MONTH(H$2),MONTH($E3)>MONTH(H$2)),(H$2-G$2)*$F3,IF(AND(MONTH($E3)=MONTH(H$2),YEAR($E3)=YEAR(H$2),MONTH($D3)<>MONTH(H$2)),($E3-G$2)*$F3,""))))
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Here are some more examples of some of the different conditions that I have created with the formula. Notice the mistakes its making on Row 3 for values in 2023 that should not be calculating and the way the formula ceases to function at all correctly in Row 6 when extended beyond one year but does function on Row 7 when the timeline extends from one year to the next.

Studio Tracker - Sample Data.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1
2FEEWEEKSSTARTENDDAILY12/31/211/31/222/28/223/31/224/30/225/31/226/30/227/31/228/31/229/30/2210/31/2211/30/2212/31/221/31/232/28/233/31/234/30/235/31/236/30/237/31/238/31/239/30/2310/31/2311/30/2312/31/231/31/242/1/24
3$ 100,000205/5/229/22/22$ 714.29 $ 18,571.43$ 21,428.57$ 22,142.86$ 22,142.86$ 15,714.29 $ 21,428.57$ 22,142.86$ 22,142.86
4$ 50,00023/1/223/15/22$ 3,571.43 $ 50,000.00  
5$ 150,00051/1/222/5/22$ 4,285.71$ 128,571.43$ 21,428.57  
6$ 200,000522/2/222/1/23$ 549.45  
7$ 200,000412/25/221/22/23$ 7,142.86 $ 42,857.14$ 157,142.86  
Sheet1
Cell Formulas
RangeFormula
E3:E7E3=D3+C3*7
F3:F7F3=IFERROR(B3/C3/7,"")
H3:AG7H3=IF(AND(MONTH($D3)=MONTH(H$2),YEAR($D3)=YEAR(H$2),MONTH($E3)=MONTH(H$2),YEAR($E3)=YEAR(H$2)),$B3,IF(AND(MONTH($D3)=MONTH(H$2),YEAR($D3)=YEAR(H$2),MONTH($E3)<>MONTH(H$2)),(H$2-$D3)*$F3,IF(AND(MONTH($D3)<MONTH(H$2),MONTH($E3)>MONTH(H$2)),(H$2-G$2)*$F3,IF(AND(MONTH($E3)=MONTH(H$2),YEAR($E3)=YEAR(H$2),MONTH($D3)<>MONTH(H$2)),($E3-G$2)*$F3,""))))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
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