Excel calculator shift night

nerxhan

New Member
Joined
Oct 29, 2015
Messages
7
Hello Masters,

I'm newbie on excel. I make a lot of research. I hope you can help me.

Can somebody advice me how to do this:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Turn[/TD]
[TD][TABLE="width: 124"]
<tbody>[TR]
[TD="class: xl64, width: 124"]Start First Turn[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 106"]
<tbody>[TR]
[TD="class: xl66, width: 106"]End First Turn[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 117"]
<tbody>[TR]
[TD="class: xl66, width: 117"]Total First Turn(minute)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 114"]
<tbody>[TR]
[TD="class: xl66, width: 114"]Start Second Turn[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="class: xl66, width: 107"]End Second Turn[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 127"]
<tbody>[TR]
[TD="class: xl66, width: 127"]Total Second Turn(minute)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 119"]
<tbody>[TR]
[TD="class: xl66, width: 119"]Start Third Turn[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 98"]
<tbody>[TR]
[TD="class: xl66, width: 98"]End Third Turn[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 188"]
<tbody>[TR]
[TD="class: xl66, width: 188"]Total Third Turn[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 201"]
<tbody>[TR]
[TD="class: xl65, width: 201"]Extra Time From Turn One[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 201"]
<tbody>[TR]
[TD="class: xl65"]Extra Time From Turn Two[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 201"]
<tbody>[TR]
[TD="class: xl65"]Extra Time From Turn Three[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]9:03:00 AM[/TD]
[TD][TABLE="width: 106"]
<tbody>[TR]
[TD="class: xl65, width: 106, align: right"]11:07 AM[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 117"]
<tbody>[TR]
[TD="class: xl65, width: 117, align: right"]125[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 114"]
<tbody>[TR]
[TD="class: xl65, width: 114, align: right"]10:16 PM[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="class: xl65, width: 107, align: right"]11:21 PM[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 127"]
<tbody>[TR]
[TD="class: xl65, width: 127, align: right"]65[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 119"]
<tbody>[TR]
[TD="class: xl65, width: 119, align: right"]11:45 PM[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 98"]
<tbody>[TR]
[TD="class: xl65, width: 98, align: right"]2:13 AM[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 188"]
<tbody>[TR]
[TD="class: xl65, width: 188, align: right"]148[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I calculate Total minute from the turn one, two, three, but I have a big problem to get minutes if they are on "night shift one" or "night shift two" from "turn one", "turn two", "turn three".

The first night shift
start at: 22:00
end at: 24: 00

The second night shift
start at: 24:00
end at: ~5:00



Thank you so much.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi. With your data pasted into A1 try this in C2:

=IF(B2>A2,(B2-A2)*1440,("24:00"-A2+B2)*1440)

Then copy and paste it into F2 and I2.
 
Upvote 0
Hi Steven, thank you for your fast response. I really appreciated

My problem is to get minutes which belong to The first night shift time or if belong to The second night shift time from "start time" and "end time" in J2, K2, L2

Thanks
 
Upvote 0
Sorry for my English.

I'm looking for solution on J2, K2, L2

I need to see if Start Turn and End Turn is on The first night shift (start at: 22:00, end at: 24: 00) or in The second night shift (start at: 24:00 end at: ~5:00).
i.e. if Start turn is 23:53 and End turn 00:14 i need to get 7 minutes from The first night shift and 14 minutes from The second night shift on J2 column
 
Upvote 0
If im understanding its something like:

=IF(B2>A2,(B2-A2)*1440,("24:00"-A2)*1440) for before midnight
=IF(B2>A2,(B2-A2)*1440,B2*1440) for after midnight
 
Upvote 0
Well you may have to change the ranges. Did you do that? I cant see your sheet.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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