Compute Time

Vtookup

Board Regular
Joined
May 30, 2017
Messages
137
Office Version
  1. 2016
  2. 2013
Hi All.
I'm confused as how the sample video works and not mine. followed danny rocks and Michael
Girvin's works... but anyway, i'm computing time, end result will look like this (based on 8 hours work)
what will be the formula and format of Total and overtime?

in out in out [work hours] [overtime]
9:00Am 11am 5:00Pm 12:00Am 9 1
8:00Am 12pm 2:00Pm 6:00Pm 8 0

thanks in advance for the help
 
Last edited:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi,

One way to do that : Remove space from formula it's an html error

E2 <a2))+(d2-c2+(d2<c2))),"h:mm")
<a2))+(d2-c2+(d2<c2))),"h:mm")
=TEXT(((B2-A2+(B2 < A2))+(D2-C2+(D2 < C2))),"h:mm")

F2 =TEXT(E2-(8 / 1440)*60,"h:mm")

[TABLE="width: 538"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]In[/TD]
[TD]Out[/TD]
[TD]In[/TD]
[TD]Out[/TD]
[TD]Work hours[/TD]
[TD]Overtime[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]9:20 AM[/TD]
[TD]11:25 AM[/TD]
[TD]5:00 PM[/TD]
[TD]12:00 AM[/TD]
[TD]9:05[/TD]
[TD]1:05[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]8:20 AM[/TD]
[TD]12:45 PM[/TD]
[TD]2:00 PM[/TD]
[TD]6:00 PM[/TD]
[TD]8:25[/TD]
[TD]0:25[/TD]
[/TR]
</tbody>[/TABLE]

</a2))+(d2-c2+(d2<c2))),"h:mm")></a2))+(d2-c2+(d2<c2))),"h:mm")
 
Last edited:
Upvote 0
A possible way to do this:

Change the format for the time entry cells to [h]:mm (type in when in Format Cells>Custom). That will allow people to fill the cells using 24 hour format: 9:00 to 11:00 and 17:00 to 24:00.
Assuming the first series is in cells A2:D2
The total hours is calculated in E2 as
Code:
=((B2-A2)+(D2-C2))*24
The OT is calculated in F2 as:
Code:
=E2-8

You have to use 24 hour time when using this method, otherwise you have an issue if you go past midnight. Any time out past midnight has to be entered as 24:50 or 25:30, or something like that.
You can use standard time notation (non-24), but then you have to do some math when the out time is past midnight (you have to add 24 hours back in)

Hope this helps.

JL
 
Upvote 0
Wow. TEXT function, i underestimated it. the word itself have you think that it really have nothing to do with numbers.
i'm wrong and it just answered my frustration. Thanks admiral100.
also thanks to jumpingCrab, the 24 hour clock is not popular in my work place. also it's common on-line solution,
which is hard to process inside my head. :confused: for me, admiral100 solution is what i wanted. straightforward. no need for MOD, formating etc. just one convertion, if i need computation.
Thanks again guys for the help. God Bless.
 
Upvote 0
Hi, Good day everyone.
I'm having a problem figuring out how to to this : If A2<=1:30Am, Then B2=2:00AM, If A2<=2:30AM, Then B2=3:00 Am.

If you entered for example 12:00 - 1:30 on cell A2, i want the cell b2 to display 2:00
Thanks in advance.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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