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 formula/version 2007

help with time sheet formula
time in/time out/time in/time out/time in/time out
can use as much as 3 ins and outs per day
8:30 am to 12:30 pm and 1:30 pm to 4:30 pm, this should equal 7 hours worked;
what if a person enters
8:25 am to 12:30 pm and 1:30 pm to 4:30 pm, round to nearest quarter hour
this still should be 7 hours;
or 8:22 am to 12:30 pm and 1:30 pm to 4:30 pm, round to nearst quarter hour
this should be 7.25, not (15min.)
basicly it needs to round both ways to nearest quarter hour no matter what
time they enter.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default formula/version 2007

The basic formula would be:

=ROUND((end-start)*24/0.25,0)*0.25

If there are multiple start/end times:

=ROUND(SUM(end1-start1,end2-start2)*24/0.25,0)*0.25

Format as General or Number

--
Biff
Microsoft Excel MVP


"JackyP" wrote in message
...
help with time sheet formula
time in/time out/time in/time out/time in/time out
can use as much as 3 ins and outs per day
8:30 am to 12:30 pm and 1:30 pm to 4:30 pm, this should equal 7 hours
worked;
what if a person enters
8:25 am to 12:30 pm and 1:30 pm to 4:30 pm, round to nearest quarter hour
this still should be 7 hours;
or 8:22 am to 12:30 pm and 1:30 pm to 4:30 pm, round to nearst quarter
hour
this should be 7.25, not (15min.)
basicly it needs to round both ways to nearest quarter hour no matter what
time they enter.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default formula/version 2007

Hi there.
The formula below rounds the difference between B2 (out) and A2 (in) to the
nearest quarter. I guess you can adapt it to your demand:

=IF(OR(ISBLANK(B2),ISBLANK(A2)),0,TIME(TRUNC((B2-A2)*24,0),VLOOKUP(((B2-A2)*24-D2)*60,{0,0;7.5,15;15,15;22.5,30;30,30;37.5,45;45, 45;52.5,60;60,60},2,TRUE),0))

Regards,
Otávio

"JackyP" wrote:

help with time sheet formula
time in/time out/time in/time out/time in/time out
can use as much as 3 ins and outs per day
8:30 am to 12:30 pm and 1:30 pm to 4:30 pm, this should equal 7 hours worked;
what if a person enters
8:25 am to 12:30 pm and 1:30 pm to 4:30 pm, round to nearest quarter hour
this still should be 7 hours;
or 8:22 am to 12:30 pm and 1:30 pm to 4:30 pm, round to nearst quarter hour
this should be 7.25, not (15min.)
basicly it needs to round both ways to nearest quarter hour no matter what
time they enter.

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 do I save an Excel 97-2003 version or 2007 version for Mac 200 Bronigal Excel Discussion (Misc queries) 1 December 7th 09 08:04 AM
Formula link in previous version not updated in Excel 2007 DH Excel Worksheet Functions 0 October 21st 09 12:44 PM
Chart from version 2003 to version 2007 Mette Charts and Charting in Excel 0 September 24th 08 07:48 AM
How can I get the same colors from 2003 version to 2007 version? Darin Excel Discussion (Misc queries) 0 June 6th 08 02:33 PM
links between 2007 version files and 97-2003 version files biff Links and Linking in Excel 1 October 20th 07 12:18 AM


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