Splitting costs based on inconsistent weeks

ljohnson88

New Member
Joined
Jul 28, 2021
Messages
5
Office Version
  1. 2010
Platform
  1. Windows
Good afternoon!

I am having serious trouble creating a formula that can split a cost dependent on how many weeks are in an accounting period.

My workplace has accounting periods 1 through to 12 and runs October through to September; so October is P1, November is P2, December is P3 etc. Periods 1,2,4,5,7,8,10 and 11 are 4 weeks long. Every third period 3,6,9,12 is 5 weeks long. So If I have A1 Start Date, B1 End Date, C1 Net Cost, D1 - O1 as P1 - P12, I would like a formula in D2 - O2 that calculates the split of the cost in cell C2 based on the dates in A2 and B2. Is this even achievable?

The working week is Thursday to Wednesday and I was told that in a newer version of Excel I could use a WEEKNUM formula? But because it is an older version, the Thursday - Wednesday working week would throw the formulas out as soon as you get to the New Year?

I have tried to set up a long list of separate formulas where by it divides the cost into the total amount of weeks and then a separate formula to multiply it again individually by the amount of weeks in that period, but this is a long process and does not take the dates into consideration. We are going to be entering anywhere between 100-300 rows of data per period, so having a date and cost manual entry only would be ideal!

Any help on this would be greatly appreciated.

Thank you.
 
Here's a new "Work" sheet for the interim calculation (NOTE: You must have the Calendar cover all possible dates, such as the row 9 Christmas 2020 through November 2023)

Cell Formulas
RangeFormula
D1,AN1,AB1,P1D1=Entry!I1
E1,AO1,AC1,Q1E1=Entry!I1
F1,AP1,AD1,R1F1=Entry!I1
G1,AQ1,AE1,S1G1=Entry!I1
H1,AR1,AF1,T1H1=Entry!I1
I1,AS1,AG1,U1I1=Entry!I1
J1,AT1,AH1,V1J1=Entry!I1
K1,AU1,AI1,W1K1=Entry!I1
L1,AV1,AJ1,X1L1=Entry!I1
M1,AW1,AK1,Y1M1=Entry!I1
N1,AX1,AL1,Z1N1=Entry!I1
O1,AY1,AM1,AA1O1=Entry!I1
A4:B10A4=Entry!A3
C4:C10C4=SUM(D4:BK4)
D4:AY10D4=IF(COUNTIFS(Calendar!$A$2:$A$4218,">="&Entry!$A3,Calendar!$A$2:$A$4218,"<="&Entry!$B3,Calendar!$C$2:$C$4218,Entry!D$2,Calendar!$D$2:$D$4218,Work!D$1)>0,D$3,0)
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Here's your entry sheet with the results:

LJohnson88-v3.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAY
1PERIOD for FY2020PERIOD for FY2021PERIOD for FY2022PERIOD for FY2023
2Start DateEnd DateNet Cost123456789101112123456789101112123456789101112123456789101112
330-Sep-2127-Oct-21$ 1,000.00$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ 1,000.00$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -
430-Sep-2128-Nov-21$ 1,000.00$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ 307.69$ 307.69$ 384.62$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -
530-Sep-2128-Sep-22$ 1,000.00$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ 76.92$ 76.92$ 96.15$ 76.92$ 76.92$ 96.15$ 76.92$ 76.92$ 96.15$ 76.92$ 76.92$ 96.15$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -
630-Sep-2103-Mar-22$ 1,000.00$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ 153.85$ 153.85$ 192.31$ 153.85$ 153.85$ 192.31$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -
725-Sep-2110-Oct-21$ 1,000.00$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ 555.56$ 444.44$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -
825-Dec-2011-Nov-23$ 10,000.00$ -$ -$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ 320.51$ 256.41$ 256.41$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -
9
Entry
Cell Formulas
RangeFormula
U1,AS1,AG1U1=I1+1
D3:AY9D3=IF(Work!$C4=0,"",Work!D4/Work!$C4*$C3)
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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