#1   Report Post  
Posted to microsoft.public.excel.misc
ChristopherM
 
Posts: n/a
Default Add/Subtract hours


I have a timesheet which records for each day of the week the time an
employee started and finished, and by subtracting one from the other I
can get the number of hours worked each day. I can also add these
hours to give a total for the week which is formatted with "[hh]" to
show a figure such as 43:45. However, I then want to subtract from
that figure the employee's standard hours (say 35) to show the overtime
(either in hh:mm or decimal - I don't mind). However every formula I
have tried just gives "#####" and when you pass the cursor over it a
tip saying "negative dates or times are displayed as #####". The
result of the calculation isn't (shouldn't be) negative however. Can
anyone suggest a formula to help? Thanks in advance for your help.


--
ChristopherM
------------------------------------------------------------------------
ChristopherM's Profile: http://www.excelforum.com/member.php...o&userid=23564
View this thread: http://www.excelforum.com/showthread...hreadid=536777

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Add/Subtract hours

Subtract TIME(35,0,0).

Also, cater for less than 35 hours worked with

=MAX(0,total_time-TIME(35,0,0))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ChristopherM"
wrote in message
news:ChristopherM.26xciy_1146143700.5868@excelforu m-nospam.com...

I have a timesheet which records for each day of the week the time an
employee started and finished, and by subtracting one from the other I
can get the number of hours worked each day. I can also add these
hours to give a total for the week which is formatted with "[hh]" to
show a figure such as 43:45. However, I then want to subtract from
that figure the employee's standard hours (say 35) to show the overtime
(either in hh:mm or decimal - I don't mind). However every formula I
have tried just gives "#####" and when you pass the cursor over it a
tip saying "negative dates or times are displayed as #####". The
result of the calculation isn't (shouldn't be) negative however. Can
anyone suggest a formula to help? Thanks in advance for your help.


--
ChristopherM
------------------------------------------------------------------------
ChristopherM's Profile:

http://www.excelforum.com/member.php...o&userid=23564
View this thread: http://www.excelforum.com/showthread...hreadid=536777



  #3   Report Post  
Posted to microsoft.public.excel.misc
ChristopherM
 
Posts: n/a
Default Add/Subtract hours


Thanks for your help - the only problem is that the hours has to be less
than 24 for it to work. If I enter 35, it treats the value as 5!


--
ChristopherM
------------------------------------------------------------------------
ChristopherM's Profile: http://www.excelforum.com/member.php...o&userid=23564
View this thread: http://www.excelforum.com/showthread...hreadid=536777

  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Add/Subtract hours

You need to format the result cell as [h]:mm

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ChristopherM"
wrote in message
news:ChristopherM.26xkuz_1146154502.0352@excelforu m-nospam.com...

Thanks for your help - the only problem is that the hours has to be less
than 24 for it to work. If I enter 35, it treats the value as 5!


--
ChristopherM
------------------------------------------------------------------------
ChristopherM's Profile:

http://www.excelforum.com/member.php...o&userid=23564
View this thread: http://www.excelforum.com/showthread...hreadid=536777



Reply
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
Need to convert hours and minutes to hours and tenths. MikeC Excel Discussion (Misc queries) 2 February 9th 06 06:22 PM
Can this adjusted GPA formual be accomplised? Chris Cred via OfficeKB.com Excel Discussion (Misc queries) 1 January 19th 06 01:59 PM
adding rows of hours and minutes to get a total Tipps Excel Worksheet Functions 1 November 4th 05 07:03 PM
How do I add/subtract hours and minutes when some values exceed 2. lhasalass Excel Discussion (Misc queries) 2 May 25th 05 04:50 PM
Subtracting paid hours from unpaid hours ejerry7 Excel Worksheet Functions 5 November 29th 04 04:16 AM


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

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

About Us

"It's about Microsoft Excel"