Time formulas

G

Guest

Here is my timesheet:

c6: 11:00 pm
c7: 12:00 am
c8: 7:00 am
c9: 3:00 pm
c10: (Actual hours worked)

If I use the formula: =IF(C6>C7,C7+1-C6,C7-C6)*24
I can get the time for c6/c7, but what formula do I use to not only get the
hours from c6/c7, but also from c8/c9 - to get the total of 9 hours in c10?

Thanks, I appreciate any help.
 
G

Guest

When I put in your formula, I get 9:00 am. I actually need 9.00. What
revision to the formula should I make?

Thanks.
 
S

Sandy Mann

=(MOD(C7-C6,1)+MOD(C9-C8,1))*24

Format the cell as General or number. This will take care of either set
crossing midnight.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
G

Guest

Excellent! It worked!

Thanks for all your help. You have made my life much easier!
 
D

David Biddulph

You asked for an answer as a number of hours, not as hours and minutes, so
don't format the answer as time, but as General or Number.
 
P

Peo Sjoblom

You need to custom format the result cell to [hh]:mm
It uses whatever regional setting (in Windows) you are using. That is why I
always change my regional settings to 24 hour.


--


Regards,


Peo Sjoblom
 
P

Peo Sjoblom

If you are going to use decimal values you need to format the result as
General or number, not time


--


Regards,


Peo Sjoblom
 
G

Guest

Thanks David, that is what I did.

David Biddulph said:
You asked for an answer as a number of hours, not as hours and minutes, so
don't format the answer as time, but as General or Number.
 
G

Guest

Thank you. I got it to work out. I appreciate your help.

Peo Sjoblom said:
You need to custom format the result cell to [hh]:mm
It uses whatever regional setting (in Windows) you are using. That is why I
always change my regional settings to 24 hour.


--


Regards,


Peo Sjoblom


Blazingsaddles said:
When I put in your formula, I get 9:00 am. I actually need 9.00. What
revision to the formula should I make?

Thanks.
 

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