Robert Davidson
New Member
- Joined
- Aug 8, 2023
- Messages
- 29
- Office Version
- 365
- Platform
- Windows
- MacOS
I am seeking help how to split bookings by date and summarising it by month and year. Thus an example of the data is:
I can split the bookings by month using the following formula which is in the Jan 2024 column (second row): =MAX(0,(MIN($B2-1,DATE(YEAR(C$1),MONTH(C$1)+1,0))-MAX($A2,C$1)+1)).
However I would like to generate the following table only using the above Start and End columns and dispense with the remainder of the above columns:
Start | End | Jan-2024 | Feb-2024 | Mar-2024 | Apr-2024 | May-2024 | Jun-2024 | Jul-2024 | Aug-2024 | Sep-2024 | Oct-2024 | Nov-2024 | Dec-2024 | Jan-2025 | Feb-2025 | Mar-2025 | Apr-2025 |
15/01/2024 | 02/02/2024 | 17 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
26/02/2024 | 04/03/2024 | 0 | 4 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
05/04/2024 | 06/04/2024 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
06/04/2024 | 12/06/2024 | 0 | 0 | 0 | 25 | 31 | 11 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
30/12/2024 | 05/01/2025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 4 | 0 | 0 | 0 |
05/09/2024 | 12/10/2024 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 11 | 0 | 0 | 0 | 0 | 0 | 0 |
14/06/2024 | 16/06/2024 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
26/02/2025 | 04/03/2025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 3 | 0 |
I can split the bookings by month using the following formula which is in the Jan 2024 column (second row): =MAX(0,(MIN($B2-1,DATE(YEAR(C$1),MONTH(C$1)+1,0))-MAX($A2,C$1)+1)).
However I would like to generate the following table only using the above Start and End columns and dispense with the remainder of the above columns:
Month | 2024 | 2025 |
Jan | 17 | 4 |
Feb | 5 | 3 |
Mar | 3 | 3 |
Apr | 26 | 0 |
May | 31 | etc. the table would build into 2026, 2027 etc as more bookings are added |
Jun | 13 | |
Jul | 0 | |
Aug | 0 | |
Sep | 26 | |
Oct | 11 | |
Nov | 0 | |
Dec | 2 |