Assigning Numbers to Months

seguin85

Active Member
Joined
Mar 17, 2015
Messages
278
Office Version
  1. 365
Platform
  1. Windows
I have a data table similar to below. What I would like to do it assign the number of machines into one of 3 categories, design, build, commissioning.

If more of the timeline is in the design portion, the # of machines would be assigned to that month. For example, line 10, November to December 2021 would be 4 in design, but January 2022 would have 4 in build as only 7 days in January are in design and the remaining days are in build.

1635863432006.png


I want the information to be transferred to a table similar to:

1635863878372.png


Any help would be greatly appreciated!! Been stuck for a while now...
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about:

Book2
ABCDEFGHIJK
18/1/20219/1/202110/1/202111/1/202112/1/20211/1/20222/1/20223/1/2022
2# MachinesDesign889134000
3# MachinesBuild00993550
4# MachinesComm000063014
5
6
7
8# MachinesDesign StartDesign FinishBuild StartStart ShipComm Finish
9
10411/3/20211/7/20225/9/20229/1/202210/7/2022
11910/15/202112/9/20212/24/20222/25/20227/19/2022
1236/9/20219/22/202110/15/20211/15/20221/31/2022
1358/9/202110/3/20211/10/20223/10/20224/11/2022
1465/15/20217/19/20219/17/202111/21/202112/21/2021
15
Sheet3
Cell Formulas
RangeFormula
D2:K2D2=SUMPRODUCT($A$10:$A$20,--(IF($C$10:$C$20<EOMONTH(D$1,0),$C$10:$C$20,EOMONTH(D$1,0))-IF($B$10:$B$20>D$1,$B$10:$B$20,D$1)>15))
D3:K3D3=SUMPRODUCT($A$10:$A$20,--(IF($E$10:$E$20<EOMONTH(D$1,0),$E$10:$E$20,EOMONTH(D$1,0))-IF($D$10:$D$20>D$1,$D$10:$D$20,D$1)>15))
D4:K4D4=SUMPRODUCT($A$10:$A$20,--(IF($F$10:$F$20<EOMONTH(D$1,0),$F$10:$F$20,EOMONTH(D$1,0))-IF($E$10:$E$20>D$1,$E$10:$E$20,D$1)>15))


The design row matches exactly, and the Comm row is pretty close, but the Build row is off by a fair amount from your example. I'm using column D as the Build start date, and column E as the Build end date. Let me know if this works for you.
 
Upvote 0
Solution
How about:

Book2
ABCDEFGHIJK
18/1/20219/1/202110/1/202111/1/202112/1/20211/1/20222/1/20223/1/2022
2# MachinesDesign889134000
3# MachinesBuild00993550
4# MachinesComm000063014
5
6
7
8# MachinesDesign StartDesign FinishBuild StartStart ShipComm Finish
9
10411/3/20211/7/20225/9/20229/1/202210/7/2022
11910/15/202112/9/20212/24/20222/25/20227/19/2022
1236/9/20219/22/202110/15/20211/15/20221/31/2022
1358/9/202110/3/20211/10/20223/10/20224/11/2022
1465/15/20217/19/20219/17/202111/21/202112/21/2021
15
Sheet3
Cell Formulas
RangeFormula
D2:K2D2=SUMPRODUCT($A$10:$A$20,--(IF($C$10:$C$20<EOMONTH(D$1,0),$C$10:$C$20,EOMONTH(D$1,0))-IF($B$10:$B$20>D$1,$B$10:$B$20,D$1)>15))
D3:K3D3=SUMPRODUCT($A$10:$A$20,--(IF($E$10:$E$20<EOMONTH(D$1,0),$E$10:$E$20,EOMONTH(D$1,0))-IF($D$10:$D$20>D$1,$D$10:$D$20,D$1)>15))
D4:K4D4=SUMPRODUCT($A$10:$A$20,--(IF($F$10:$F$20<EOMONTH(D$1,0),$F$10:$F$20,EOMONTH(D$1,0))-IF($E$10:$E$20>D$1,$E$10:$E$20,D$1)>15))


The design row matches exactly, and the Comm row is pretty close, but the Build row is off by a fair amount from your example. I'm using column D as the Build start date, and column E as the Build end date. Let me know if this works for you.

How about:

Book2
ABCDEFGHIJK
18/1/20219/1/202110/1/202111/1/202112/1/20211/1/20222/1/20223/1/2022
2# MachinesDesign889134000
3# MachinesBuild00993550
4# MachinesComm000063014
5
6
7
8# MachinesDesign StartDesign FinishBuild StartStart ShipComm Finish
9
10411/3/20211/7/20225/9/20229/1/202210/7/2022
11910/15/202112/9/20212/24/20222/25/20227/19/2022
1236/9/20219/22/202110/15/20211/15/20221/31/2022
1358/9/202110/3/20211/10/20223/10/20224/11/2022
1465/15/20217/19/20219/17/202111/21/202112/21/2021
15
Sheet3
Cell Formulas
RangeFormula
D2:K2D2=SUMPRODUCT($A$10:$A$20,--(IF($C$10:$C$20<EOMONTH(D$1,0),$C$10:$C$20,EOMONTH(D$1,0))-IF($B$10:$B$20>D$1,$B$10:$B$20,D$1)>15))
D3:K3D3=SUMPRODUCT($A$10:$A$20,--(IF($E$10:$E$20<EOMONTH(D$1,0),$E$10:$E$20,EOMONTH(D$1,0))-IF($D$10:$D$20>D$1,$D$10:$D$20,D$1)>15))
D4:K4D4=SUMPRODUCT($A$10:$A$20,--(IF($F$10:$F$20<EOMONTH(D$1,0),$F$10:$F$20,EOMONTH(D$1,0))-IF($E$10:$E$20>D$1,$E$10:$E$20,D$1)>15))


The design row matches exactly, and the Comm row is pretty close, but the Build row is off by a fair amount from your example. I'm using column D as the Build start date, and column E as the Build end date. Let me know if this works for you.

Looks like it works for what I needed! Thank-you Eric!
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,267
Members
449,075
Latest member
staticfluids

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