Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Time and lunch breaks

Is it possible to subtract two times and automatically have it subtract .5
hours for a lunch break if it is over 5 hours? I'd like to do this all in one
cell. Any suggestions would be helpful!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Time and lunch breaks

=A1-B1-if(A1-B15/24,.5/24,0)
formated as time

"mndpy" wrote:

Is it possible to subtract two times and automatically have it subtract .5
hours for a lunch break if it is over 5 hours? I'd like to do this all in one
cell. Any suggestions would be helpful!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Time and lunch breaks

=(B2-A2)*24-((B2-A2)*245)*0.5


"mndpy" wrote:

Is it possible to subtract two times and automatically have it subtract .5
hours for a lunch break if it is over 5 hours? I'd like to do this all in one
cell. Any suggestions would be helpful!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Time and lunch breaks

That didn't seem to work. I have it set like this

G13 7:30 AM
G14 10:00 PM
G15 14.5

Do I need to have G15 formatted differently? It is general text now. Any
other suggestions would be great! Thanks!

"bj" wrote:

=A1-B1-if(A1-B15/24,.5/24,0)
formated as time

"mndpy" wrote:

Is it possible to subtract two times and automatically have it subtract .5
hours for a lunch break if it is over 5 hours? I'd like to do this all in one
cell. Any suggestions would be helpful!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Time and lunch breaks

if you want it as a number and g13 and g14 are formated as time
in g15
=mod(g14-g13,1)*24-if(mod(g14-g13)*255,.5,0)
this will allow you to go over midnight and still have the correct answer

"mndpy" wrote:

That didn't seem to work. I have it set like this

G13 7:30 AM
G14 10:00 PM
G15 14.5

Do I need to have G15 formatted differently? It is general text now. Any
other suggestions would be great! Thanks!

"bj" wrote:

=A1-B1-if(A1-B15/24,.5/24,0)
formated as time

"mndpy" wrote:

Is it possible to subtract two times and automatically have it subtract .5
hours for a lunch break if it is over 5 hours? I'd like to do this all in one
cell. Any suggestions would be helpful!



  #6   Report Post  
Member
 
Posts: 84
Default

I tried the suggested formula and it works fine!!! You might want to try again.

Quote:
Originally Posted by mndpy View Post
That didn't seem to work. I have it set like this

G13 7:30 AM
G14 10:00 PM
G15 14.5

Do I need to have G15 formatted differently? It is general text now. Any
other suggestions would be great! Thanks!

"bj" wrote:

=A1-B1-if(A1-B15/24,.5/24,0)
formated as time

"mndpy" wrote:

Is it possible to subtract two times and automatically have it subtract .5
hours for a lunch break if it is over 5 hours? I'd like to do this all in one
cell. Any suggestions would be helpful!
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
Time Calculation For A Timesheet To Include Lunch poddys Excel Worksheet Functions 2 March 3rd 06 08:05 PM
Deducting breaks from time measurements Chris Strug Excel Worksheet Functions 1 October 5th 05 10:57 AM
How can I do one-time printing without set page breaks? kewlblondboy Excel Discussion (Misc queries) 2 August 24th 05 02:53 PM
Subtracting lunch breaks from different shift times badger Excel Discussion (Misc queries) 5 June 27th 05 04:10 PM
How can Excel do daily timesheet, -lunch time, & not use colon in. Jan Excel Worksheet Functions 2 March 8th 05 10:05 PM


All times are GMT +1. The time now is 08:46 AM.

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"