#1   Report Post  
Posted to microsoft.public.excel.misc
Caveman
 
Posts: n/a
Default calculate hours


Hi
I have a spreadsheet formated custom hh:mm in cells A2:A6, A2 is the
start time (1am), A3 is a break (45mins) taken at 3.45am, A4 is a break
(1hour) taken at 5.15am, A5 is my finish time 1445pm, I get extra £3.00
an hour for hours worked between 18:00 and 06:00. A6 is total hors
worked. I want another cell (A7) to show how many hours were worked
between 18:00 and 06:00. Calculation can show with breaks out or
included, or both.
Many Thanks
Caveman


--
Caveman
------------------------------------------------------------------------
Caveman's Profile: http://www.excelforum.com/member.php...o&userid=27546
View this thread: http://www.excelforum.com/showthread...hreadid=546484

  #2   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith
 
Posts: n/a
Default calculate hours

Try something like this:

a7 =min(a5,time(6,0,0))-if(a2<a5,a2,max(a2,time(18,0,0))-1)

This will calculate the total time worked between 18h00 and 6h00, including
breaks.

To subtract the breaks, you would deduct:

=if(and(a3time(5,15,0),a3<time(6,0,0)),time(6,0,0 )-a3,0)+if(and(a4time(5,0,0),a4<time(6,0,0)),time(6 ,0,0)-a4,0)

Hope this helps.

--
Regards,
Fred


"Caveman" wrote in message
...

Hi
I have a spreadsheet formated custom hh:mm in cells A2:A6, A2 is the
start time (1am), A3 is a break (45mins) taken at 3.45am, A4 is a break
(1hour) taken at 5.15am, A5 is my finish time 1445pm, I get extra £3.00
an hour for hours worked between 18:00 and 06:00. A6 is total hors
worked. I want another cell (A7) to show how many hours were worked
between 18:00 and 06:00. Calculation can show with breaks out or
included, or both.
Many Thanks
Caveman


--
Caveman
------------------------------------------------------------------------
Caveman's Profile:
http://www.excelforum.com/member.php...o&userid=27546
View this thread: http://www.excelforum.com/showthread...hreadid=546484



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
how to calculate the hours and minutes in excel Mital Excel Discussion (Misc queries) 3 February 14th 06 06:49 PM
Calculate Hours and overtime by week gregt812 Excel Worksheet Functions 1 November 23rd 05 07:03 PM
How do I calculate hours in Excel Bobbi Prochnow [MSFT] New Users to Excel 0 October 31st 05 07:51 PM
calculate hours just can't figure it out monish74 Excel Worksheet Functions 1 February 13th 05 07:31 PM
calculate difference in time to hours Chris Excel Worksheet Functions 5 January 18th 05 06:07 PM


All times are GMT +1. The time now is 06:40 AM.

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"