Need help with this formula

G

Guest

=INT((C13-B13)*24)
I use this formula to calculate the total hours worked. It does fine for
straight hours but not with partial hours.
If the start time is 6:00 AM and the end time is 17:00 PM or (5:00 PM) the
formula will return 11 hrs. However if the end time is say 16:30 PM it
returns 10 hrs instead of 10.5 hrs. How can this be changed to show hours and
minutes or would I need to use a different formula.
 
I

IC

dvonj said:
=INT((C13-B13)*24)
If the start time is 6:00 AM and the end time is 17:00 PM or (5:00 PM) the
formula will return 11 hrs. However if the end time is say 16:30 PM it
returns 10 hrs instead of 10.5 hrs. How can this be changed to show hours and
minutes or would I need to use a different formula.

INT means integer ie only the integer porion of the result is shown.
Anything after the decimal point is removed.

If you really want hours and minutes instead of partial hours as a decimal,
use C13-B13 and format the result as time.
 
B

BenjieLop

dvonj said:
=INT((C13-B13)*24)
I use this formula to calculate the total hours worked. It does fin
for
straight hours but not with partial hours.
If the start time is 6:00 AM and the end time is 17:00 PM or (5:00 PM
the
formula will return 11 hrs. However if the end time is say 16:30 PM it
returns 10 hrs instead of 10.5 hrs. How can this be changed to sho
hours and
minutes or would I need to use a different formula.

Remove the "INT" in your original formula. Thus, your modified formul
should be

=(C13-B13)*2
 
G

Guest

I don't want to show h:mm but total hours worked. Total hours for that day
and total hours for that week. So if I worked 8hrs for four days and 7and one
half hours on the fifth day I need to show the total hour worked as 39.5hrs.

What I do is log my sign on time and my sign off time.
 
G

Guest

Thanks that worked this time. It's funny because I tried that before and it
did not work. Maybe I did something incorrectly the first time.
 
B

BenjieLop

<< I don't want to show h:mm but total hours worked.>>

The cell where you enter the formula

=(C13-B13)*24

and format the cell as GENERAL and this will show you your total hour
worked for the day.


<< Total hours for that day >>

As stated, the formula =(C13-B13)*24 , with the cell formatted a
GENERAL, will give you the total hours worked for the day.


<< and total hours for that week. >>

Assuming that your work week is 5 working days, you can copy down th
formula up to the 17th row. This will give you your daily worke
hours.


<< So if I worked 8hrs for four days and 7and one half hours on th
fifth day I need to show the total hour worked as 39.5hrs. >>

The total of the 5 columns is the sum of your daily worked hours then.


<< What I do is log my sign on time and my sign off time. >>

The above procedure/formulas will work for you
 
R

RagDyeR

And, if you should be transferred to the night shift, you would need this
formula to account for times past midnight:

=((C13-B13)+(C13<B13))*24
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


Thanks that worked this time. It's funny because I tried that before and it
did not work. Maybe I did something incorrectly the first time.
 

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