how to divide Continuous data into time based groups ?

paradisein

New Member
Joined
Dec 2, 2013
Messages
14
Hello Professional,

i have continuous data (time & Kg) of material consumption for 3 working shift of a Factory
i would like to separate this continuous data into 3 Shifts for every day:

for 9.9.2017:
Day shift: from 06:00 till 14:00 average consumption of shift 1=....
Late shift: from 14:00 till 22:00 average consumption of shift 2=....
night shift: from 22:00 till 6:00 average consumption of shift 3=....

then calculate the average consumption per shift for every day

then build a table /chart between the 3 shifts & average consumption to know

which shift has the higher consumption.

below is a sample table of continuous data, i will make this study on 1 year data.
i hope it is not complicated.....and thank you in advance
Best Regards

[TABLE="width: 188"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Time[/TD]
[TD]Kg
[/TD]
[/TR]
[TR]
[TD="align: right"]08.09.2017 22:00
[/TD]
[TD="align: right"]1,93
[/TD]
[/TR]
[TR]
[TD="align: right"]08.09.2017 23:00
[/TD]
[TD="align: right"]2,07[/TD]
[/TR]
[TR]
[TD="align: right"]08.09.2017 23:30[/TD]
[TD="align: right"]1,99[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 00:00[/TD]
[TD="align: right"]1,80[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 01:00[/TD]
[TD="align: right"]2,00[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 02:00[/TD]
[TD="align: right"]1,77[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 04:00[/TD]
[TD="align: right"]2,00[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 05:00[/TD]
[TD="align: right"]2,02[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 06:00[/TD]
[TD="align: right"]2,03[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 07:00[/TD]
[TD="align: right"]2,20[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 08:00[/TD]
[TD="align: right"]2,11[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 09:00[/TD]
[TD="align: right"]2,39[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 10:00[/TD]
[TD="align: right"]2,46[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 11:00[/TD]
[TD="align: right"]2,08[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 12:00[/TD]
[TD="align: right"]2,02[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 13:00[/TD]
[TD="align: right"]2,11[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 15:00[/TD]
[TD="align: right"]2,13[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 16:00[/TD]
[TD="align: right"]1,99[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 17:00[/TD]
[TD="align: right"]1,85[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 18:00[/TD]
[TD="align: right"]2,08[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 20:00[/TD]
[TD="align: right"]1,99[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 21:00[/TD]
[TD="align: right"]1,97[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 22:00[/TD]
[TD="align: right"]1,95[/TD]
[/TR]
[TR]
[TD="align: right"]09.09.2017 23:00[/TD]
[TD="align: right"]1,85[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 00:00[/TD]
[TD="align: right"]1,93[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 01:00[/TD]
[TD="align: right"]2,07[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 02:00[/TD]
[TD="align: right"]2,07[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 03:00[/TD]
[TD="align: right"]1,88[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 05:00[/TD]
[TD="align: right"]2,13[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 06:00[/TD]
[TD="align: right"]1,82[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 07:00[/TD]
[TD="align: right"]2,08[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 08:00[/TD]
[TD="align: right"]2,04[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 10:00[/TD]
[TD="align: right"]2,01[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 11:00[/TD]
[TD="align: right"]2,09[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 12:00[/TD]
[TD="align: right"]2,06[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 13:00[/TD]
[TD="align: right"]2,02[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 14:00[/TD]
[TD="align: right"]2,00[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 15:00[/TD]
[TD="align: right"]2,09[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 16:00[/TD]
[TD="align: right"]1,94[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 17:00[/TD]
[TD="align: right"]1,94[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 18:00[/TD]
[TD="align: right"]1,87[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 19:00[/TD]
[TD="align: right"]1,85[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 20:00[/TD]
[TD="align: right"]1,90[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 21:00[/TD]
[TD="align: right"]2,03[/TD]
[/TR]
[TR]
[TD="align: right"]10.09.2017 22:00[/TD]
[TD="align: right"]1,95[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi,
it is one column
i split it into 2 columns one for date and one for time, but still do not know how to group them
thx
 
Upvote 0
as your dates format is nonstandard I'd replaced all the "." with "/" so that excel can work with, also the "," with "." in the Kg column (note that you probably don't have to do that pending on your excel local setting)


Excel 2013/2016
ABCDE
1TimeKgShiftAverage
208/09/2017 22:001.93311.97
308/09/2017 23:002.07122.10
408/09/2017 23:301.99131.97
509/09/2017 00:001.81
609/09/2017 01:0021
709/09/2017 02:001.771
809/09/2017 04:0021
909/09/2017 05:002.021
1009/09/2017 06:002.032
1109/09/2017 07:002.22
1209/09/2017 08:002.112
1309/09/2017 09:002.392
1409/09/2017 10:002.462
1509/09/2017 11:002.082
1609/09/2017 12:002.022
1709/09/2017 13:002.112
1809/09/2017 15:002.133
1909/09/2017 16:001.993
2009/09/2017 17:001.853
2109/09/2017 18:002.083
2209/09/2017 20:001.993
2309/09/2017 21:001.973
2409/09/2017 22:001.953
2509/09/2017 23:001.851
2610/09/2017 00:001.931
2710/09/2017 01:002.071
2810/09/2017 02:002.071
2910/09/2017 03:001.881
3010/09/2017 05:002.131
3110/09/2017 06:001.822
3210/09/2017 07:002.082
3310/09/2017 08:002.042
3410/09/2017 10:002.012
3510/09/2017 11:002.092
3610/09/2017 12:002.062
3710/09/2017 13:002.022
3810/09/2017 14:0023
3910/09/2017 15:002.093
4010/09/2017 16:001.943
4110/09/2017 17:001.943
4210/09/2017 18:001.873
4310/09/2017 19:001.853
4410/09/2017 20:001.93
4510/09/2017 21:002.033
4610/09/2017 22:001.953
Sheet1
Cell Formulas
RangeFormula
C2=IF(OR(A2-INT(A2)<6/24,A2-INT(A2)>22/24),1,IF(AND(A2-INT(A2)>=6/24,A2-INT(A2)<=14/24),2,3))
E2=AVERAGEIF($C:$C,D2,$B:$B)
 
Upvote 0
Thank you AlanY for the greet Help
it is working like magic ..... unbelievable :)

i imported large data and ran the code, then come new issue

during the shutdown the Kg is 0.0, so i got a lot of Zero record


some times the shutdown is 1.5 shift for example:

shift 1: 0, 0, 0, 0 av= 0+0+0+0/4 =0
shift 2: 0, 0, 2, 2 av= 0+0+2+2/4 = 1
shift 3: 1, 1, 1.5, 1.5 av= 1.5+1+1.5+2 = 1.5

the shutdown will be overlooked and give false evaluation to the shifts

how can i ignore the zero records ?

your help will be highly appreciated
thx
Paradisein
 
Upvote 0
try amend formula in E2 to

=AVERAGEIFS(B:B,C:C,D2,A:A,">0")

and copy down
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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