LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default sum of hours


I should add it would be far simpler to put the start time
in one column and end time in another (formatted to show
hh:mm) and then just calculate the difference....if you
want the option to put in "off" you could just start with
if (cell="off",0,normal calculation).

John

-----Original Message-----
This is a little convoluded but here goes:

if cell a3 is '2am-5pm

=SEARCH("-",A3,1) is put in cell b3

=LEFT(A3,B3-1) is put in c3

=RIGHT(A3,LEN(A3)-B3) is put in c3

=IF(RIGHT(C3,2)="am",VALUE(LEFT(C3,LEN(C3)-2)&" am"),VALUE
(LEFT(C3,LEN(C3)-2)&" pm")) in e3 give you the start time

=IF(RIGHT(D3,2)="am",VALUE(LEFT(D3,LEN(D3)-2)&" am"),VALUE
(LEFT(D3,LEN(D3)-2)&" pm")) in f3 give you the end time

=IF(F3E3,(F3-E3)*24,(F3+1-E3)*24) in g3 give you the
hours difference (assuming that start time and end time
are on same day or successive days)

John

-----Original Message-----
THANK YOU PAPOU. HOWEVER, WHAT IF I WANT TO HAVE A

COUPLE OF DAYS OFF FOR
AN EMPLOYEE BY PUTTING THE WORD OFF THERE? IT WOULD NOT

ADD UP TO A RIGHT
NUMBER, IS IT?

"Papou" wrote

in message
...
Hi Raymond
Have a look at Number formats, Hour Category you will

find precisely the
number format you are looking for.
Please note you must input hours as 00:00:00 (AM or PM

mention will be
automatically added)

HTH
Cordially
Pascal

"Raymond" a écrit dans le

message de
...
I run a small business that I need to schedule the

work hours for my
employees on a sheet. A particular cell contains

the
hours work for an
mployee from 2 am-5 Pm, 2 pm- 9pm. That were

exactly
what I put down.
However, I want excel to automatically add the total

hours worked by
each
employee in the right most colum. However, I cannot

use the sum
function
with the format from above. Is there a different

way
for me to input
the
hours, so that the sum function will work, but I

still want a format
similar to the once from above?

Thank You.






.

.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumif and translate annual hours into weekly quarter hours se7098 Excel Worksheet Functions 23 October 11th 08 01:37 AM
wages - multiply hours and minutes by number of hours worked Carol (Australia) Excel Discussion (Misc queries) 6 April 1st 07 01:16 AM
Drivers Hours Timesheet - Calculate Hours Worked on Weekly Basis Graham Excel Discussion (Misc queries) 2 January 28th 07 08:40 PM
how to add hours and show actual hours not decimal numbers TWERNER New Users to Excel 2 August 21st 06 08:35 AM
Convert hours and minutes in time format into fractions of hours.. Akern Excel Worksheet Functions 4 April 21st 05 02:56 PM


All times are GMT +1. The time now is 04:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"