Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Calcualting hours

Please help create a formula to calculate total hours serviced for a technician who conducts a service call, which takes him 3 days to complete. If the start date is 10/20/2009 10:00 a.m. and the service is completed on 10/22/2009 12:00 p.m., I would like to collect the total hours in house minus the hours the shop was closed, which is from 5 p.m. to 9 the next morning. The results should be approx. 18 hours of service.

EggHeadCafe - Software Developer Portal of Choice
CSV Reader in C#
http://www.eggheadcafe.com/tutorials...ader-in-c.aspx
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default Calcualting hours

Try

=N((INT(A11)-INT(A10)+1)*8-MAX(HOUR(A10)-9,0)-MAX(17-HOUR(A11),0))

--
__________________________________
HTH

Bob

<Charles Bostic wrote in message ...
Please help create a formula to calculate total hours serviced for a
technician who conducts a service call, which takes him 3 days to
complete. If the start date is 10/20/2009 10:00 a.m. and the service is
completed on 10/22/2009 12:00 p.m., I would like to collect the total
hours in house minus the hours the shop was closed, which is from 5 p.m.
to 9 the next morning. The results should be approx. 18 hours of service.

EggHeadCafe - Software Developer Portal of Choice
CSV Reader in C#
http://www.eggheadcafe.com/tutorials...ader-in-c.aspx



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Calcualting hours

Why the N() function, Bob?
--
David Biddulph

"Bob Phillips" wrote in message
...
Try

=N((INT(A11)-INT(A10)+1)*8-MAX(HOUR(A10)-9,0)-MAX(17-HOUR(A11),0))

--
__________________________________
HTH

Bob

<Charles Bostic wrote in message
...
Please help create a formula to calculate total hours serviced for a
technician who conducts a service call, which takes him 3 days to
complete. If the start date is 10/20/2009 10:00 a.m. and the service is
completed on 10/22/2009 12:00 p.m., I would like to collect the total
hours in house minus the hours the shop was closed, which is from 5 p.m.
to 9 the next morning. The results should be approx. 18 hours of service.

EggHeadCafe - Software Developer Portal of Choice
CSV Reader in C#
http://www.eggheadcafe.com/tutorials...ader-in-c.aspx





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Calcualting hours

Charles,

Try this one which will do part hours and has an additional field for
Holidays. If you use it create a named range called 'Holidays' and enter the
dates of any days you want to exclude.

It rurns decial hours/minutes if formatted as general. Remove the *24 from
the end and format as [h]:mm to get time.

=((NETWORKDAYS(A1,B1,Holidays)-1)*("17:00"-"09:00")+MOD(B1,1)-MOD(A1,1))*24



Mike


"Charles Bostic" wrote:

Please help create a formula to calculate total hours serviced for a technician who conducts a service call, which takes him 3 days to complete. If the start date is 10/20/2009 10:00 a.m. and the service is completed on 10/22/2009 12:00 p.m., I would like to collect the total hours in house minus the hours the shop was closed, which is from 5 p.m. to 9 the next morning. The results should be approx. 18 hours of service.

EggHeadCafe - Software Developer Portal of Choice
CSV Reader in C#
http://www.eggheadcafe.com/tutorials...ader-in-c.aspx
.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default Calcualting hours

That was to force it into a number, otherwise it returned the result as a
timestamp.

--
__________________________________
HTH

Bob

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Why the N() function, Bob?
--
David Biddulph

"Bob Phillips" wrote in message
...
Try

=N((INT(A11)-INT(A10)+1)*8-MAX(HOUR(A10)-9,0)-MAX(17-HOUR(A11),0))

--
__________________________________
HTH

Bob

<Charles Bostic wrote in message
...
Please help create a formula to calculate total hours serviced for a
technician who conducts a service call, which takes him 3 days to
complete. If the start date is 10/20/2009 10:00 a.m. and the service is
completed on 10/22/2009 12:00 p.m., I would like to collect the total
hours in house minus the hours the shop was closed, which is from 5 p.m.
to 9 the next morning. The results should be approx. 18 hours of
service.

EggHeadCafe - Software Developer Portal of Choice
CSV Reader in C#
http://www.eggheadcafe.com/tutorials...ader-in-c.aspx









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Calcualting hours

I see. The other option is just to format the cell as General.
--
David Biddulph

"Bob Phillips" wrote in message
...
That was to force it into a number, otherwise it returned the result as a
timestamp.

--
__________________________________
HTH

Bob

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Why the N() function, Bob?
--
David Biddulph

"Bob Phillips" wrote in message
...
Try

=N((INT(A11)-INT(A10)+1)*8-MAX(HOUR(A10)-9,0)-MAX(17-HOUR(A11),0))

--
__________________________________
HTH

Bob

<Charles Bostic wrote in message
...
Please help create a formula to calculate total hours serviced for a
technician who conducts a service call, which takes him 3 days to
complete. If the start date is 10/20/2009 10:00 a.m. and the service
is completed on 10/22/2009 12:00 p.m., I would like to collect the
total hours in house minus the hours the shop was closed, which is from
5 p.m. to 9 the next morning. The results should be approx. 18 hours of
service.

EggHeadCafe - Software Developer Portal of Choice
CSV Reader in C#
http://www.eggheadcafe.com/tutorials...ader-in-c.aspx








  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default Calcualting hours

I find that even when it is General, Excel in its infinite wisdom reformats
it. I can format afterwarsd, but I end up doing it so often; N() works for
me.

--
__________________________________
HTH

Bob

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
I see. The other option is just to format the cell as General.
--
David Biddulph

"Bob Phillips" wrote in message
...
That was to force it into a number, otherwise it returned the result as a
timestamp.

--
__________________________________
HTH

Bob

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Why the N() function, Bob?
--
David Biddulph

"Bob Phillips" wrote in message
...
Try

=N((INT(A11)-INT(A10)+1)*8-MAX(HOUR(A10)-9,0)-MAX(17-HOUR(A11),0))

--
__________________________________
HTH

Bob

<Charles Bostic wrote in message
...
Please help create a formula to calculate total hours serviced for a
technician who conducts a service call, which takes him 3 days to
complete. If the start date is 10/20/2009 10:00 a.m. and the service
is completed on 10/22/2009 12:00 p.m., I would like to collect the
total hours in house minus the hours the shop was closed, which is
from 5 p.m. to 9 the next morning. The results should be approx. 18
hours of service.

EggHeadCafe - Software Developer Portal of Choice
CSV Reader in C#
http://www.eggheadcafe.com/tutorials...ader-in-c.aspx










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
HELP w/ auto calcualting timesheet Empress[_2_] Excel Worksheet Functions 3 August 24th 09 10:53 PM
sumif and translate annual hours into weekly quarter hours se7098 Excel Worksheet Functions 23 October 11th 08 01:37 AM
Drivers Hours Timesheet - Calculate Hours Worked on Weekly Basis Graham Excel Discussion (Misc queries) 2 January 28th 07 08:40 PM
problem with calcualting olasa Excel Discussion (Misc queries) 0 March 20th 05 11:40 PM
Pivot table. Calcualting % from subtotals. Ray D Excel Worksheet Functions 1 January 27th 05 12:35 PM


All times are GMT +1. The time now is 12:31 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"