Split Dates Between Contract and Reporting Periods

*shudder*

Well-known Member
Joined
Aug 20, 2009
Messages
510
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I would like to find a way to automatically split dates for contract periods into reporting periods.

The contract data is pulled from a database using Power Query in Excel by using the following selection items.

Selection Items:
Project InformationCustomer:ABC Limited
Key:
Review Period Start Date:01/04/202201/04/202231/03/2023Year 1
Frequency (years):201/04/202331/03/2024Year 2
End Date31/03/202401/04/202431/03/2025N/A
Review Number:01/04/202531/03/2026N/A
01/04/202631/03/2027N/A


Once the above is completed it populates the table below:

Source Data: Contract Costs
KeyStartEndLabourMaterialsHireExpensesTotal
Year 130/06/202129/06/202250,624.5314,695.746,812.20853.4572,985.93
Year 101/06/202229/06/20223,784.11996.48281.6749.265,111.52
Year 130/06/202229/06/202356,548.5214,891.124,209.19736.0876,384.92
Year 201/05/202329/06/20234,134.361,103.96311.0154.315,603.64
Year 230/06/202329/06/202461,920.6216,534.114,658.05813.4583,926.23
N/A0.000.000.000.000.00
N/A0.000.000.000.000.00
N/A0.000.000.000.000.00
N/A0.000.000.000.000.00
Total:126,387.6133,525.679,459.931,653.11171,026.31

I want to be able to automatically split the dates from the contract periods into the reporting periods as per the start and end dates i.e the first contact period is 30.06.2021 - 29.06.2022, but the reporting period begins 01.04.2022 so the reporting period would be 01.04.2022 - 29.06.2022 as row 2. Where a contract straddles a reporting period I need to split those costs i.e. contract runs from 30.06.2022 - 29.06.2023, this needs to be split to 30.06.2022 - 31.03.2023 and 01.04.2023 - 29.06.2023 as per rows 4 & 5 below.

Expected result: Contract costs per report period
KeyStartEndLabourMaterialsHireExpensesTotal
Year 101/04/202229/06/202212,482.763,623.611,679.72210.4417,996.53
Year 101/06/202229/06/20223,784.11996.48281.6749.265,111.52
Year 130/06/202231/03/202342,605.0511,219.343,171.31554.5857,550.28
Year 201/04/202329/06/202313,943.473,671.781,037.88181.5018,834.64
Year 230/06/202331/03/202446,694.2412,468.353,512.63613.4263,288.63
N/A
N/A
N/A
N/A
Total:119,509.6331,979.559,683.221,609.20162,781.60

I have already worked out the formulas to split the costs, it is just splitting the dates I am having trouble with.

Any guidance would be much appreciated.

I am using Excel 2016.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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