Single cell hour calculation 1:15PM -7:30PM

B

boe

Is it possible for me to easily display a cell that looks like
1:15PM -7:30PM but then have a calculation cell next to it that shows 6.25
hours?

Thank you
 
F

Frank Kabel

Hi
could you split these entry values in two cells (and then simply
subtract the values).
 
B

boe

Actually I'd be happy if I can do any hourly math that doesn't force me to
display the numbers in military time. Two columns to one for time in and
one for time out would be acceptable.
 
B

boe

Thanks - I set it up like this
=HOUR(C19-B19)
But the formula didn't work for me when the the shift started at 1:30PM on
Monday and extended to 6AM on a Tuesday I get a #num!
1:30 PM 6:00 AM
 
F

Frank Kabel

Hi
use
=C19-B19+(C19<B19)

and format this value as 'Time'. If you need a decimal
value use:
=(C19-B19+(C19<B19))*24
and format as 'Number'
 
A

Arvi Laanemets

Hi

At first be sure start and end times are in time format.

=C19-B19+(C19<B19)
 
B

boe

Thank you I appreciate the help. Sorry I should have given you the exact
goal to start with. I think I'm going to need an if then or something so
that I can use the same formula for a series of numbers
1:30AM - 10:00AM = 8.50
1:10PM - 9:00PM = 7.45
10:20PM - 9:00AM = 10:45
etc.
I'm trying to make a time sheet that will give me results rounded to the
nearest 15minutes
 
F

Frank Kabel

Hi
if you want to round your result use:
=ROUND((C19-B19+(C19<B19))*24*4,0)/(24*4)
 
B

boe

Thanks but I'm doing something wrong - this is what I got in my first test
using that formula

Time In Time Out Total hours

3:00 AM 7:30 AM 0.1875
3:00 PM 10:00 AM 0.791667
1:00 PM 10:00 PM 0.375
 
F

Frank Kabel

Hi
nearly there :)
just format the total houers with a time format.
If you want to sum this column you may format the resulting cell with
the custom format
[hh]:mm

the [] brackets prevent a rollover after 24 hours
 
B

boe

Sorry - I forgot to change the cell to hours but the last number comes up
wrong - 1PM to 10PM should be 9 hours I'm trying to figure out a cell that
can cover both single and double shifts.

Time In Time Out Total hours

3:00 AM 7:30 AM 4:30
3:00 PM 10:00 AM 19:00
1:00 PM 10:00 PM 15:00
 
B

boe

DOOH - I appreciate the help - this works exactly as you said it did, I got
the numbers backwards - THANKS AGAIN!!!!
 
B

boe

Thanks again!!

Frank Kabel said:
Hi
nearly there :)
just format the total houers with a time format.
If you want to sum this column you may format the resulting cell with
the custom format
[hh]:mm

the [] brackets prevent a rollover after 24 hours

--
Regards
Frank Kabel
Frankfurt, Germany

boe said:
Thanks but I'm doing something wrong - this is what I got in my first test
using that formula

Time In Time Out Total hours

3:00 AM 7:30 AM 0.1875
3:00 PM 10:00 AM 0.791667
1:00 PM 10:00 PM 0.375
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top