Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kalika
 
Posts: n/a
Default overtime formula based on dynamic date range?


Is there a way to formulate which portion of a day's hours worked are
overtime hours? Here is an example. I'm looking for a formula for the
overtime (col.F) that will sum any hourly values (col.E) over 40 hrs for
the same week, with Monday being the first day of the week. I've tried
using SUMIF, SUMPRODUCT, LOOKUP, WEEKNUM, etc., but I'm a newbie so it
never works ;). Also the workweek is not always the same so I can't
just sum a set 5-cell range.

Date Day TimeIn Time Out Total Hrs. Overtime
8/01 Mon 2:56p 1:53a 10.95
8/02 Tue 2:58p 1:25a 10.45
8/03 Wed 5:00p 10:15p 5.25
8/04 Thu 4:45p 11:15p 6.50
8/05 Fri 3:08p 1:04a 9.93 3.08
8/06 Sat 4:07p 11:04p 6.95 6.95
8/07 Sun 2:59p 1:31a 10.53 10.53
8/09 Tue 4:50p 9:48p 4.96
8/10 Wed 3:10p 12:55a 9.75
8/11 Thu 4:57p 10:30p 5.55
8/12 Fri 3:09p 3:32a 12.38
8/14 Sun 3:04p 1:14a 10.16 2.81

TIA--
kalika


+-------------------------------------------------------------------+
|Filename: Untitled.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=3747 |
+-------------------------------------------------------------------+

--
kalika
------------------------------------------------------------------------
kalika's Profile: http://www.excelforum.com/member.php...o&userid=26651
View this thread: http://www.excelforum.com/showthread...hreadid=399380

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Kalika,

If you can add another helper column, this should do it.

In F2, add =E2
In F3, add
=IF((IF(WEEKDAY(A3)=2,A3,A3-WEEKDAY(A3-2)))=(IF(WEEKDAY(A2)=2,A2,A2-WEEKDAY(
A2-2))),E3+F2,E3)
and copy that down

Then in G2, add =MAX(0,F2-40)
and copy that down

--

HTH

RP
(remove nothere from the email address if mailing direct)


"kalika" wrote in
message ...

Is there a way to formulate which portion of a day's hours worked are
overtime hours? Here is an example. I'm looking for a formula for the
overtime (col.F) that will sum any hourly values (col.E) over 40 hrs for
the same week, with Monday being the first day of the week. I've tried
using SUMIF, SUMPRODUCT, LOOKUP, WEEKNUM, etc., but I'm a newbie so it
never works ;). Also the workweek is not always the same so I can't
just sum a set 5-cell range.

Date Day TimeIn Time Out Total Hrs. Overtime
8/01 Mon 2:56p 1:53a 10.95
8/02 Tue 2:58p 1:25a 10.45
8/03 Wed 5:00p 10:15p 5.25
8/04 Thu 4:45p 11:15p 6.50
8/05 Fri 3:08p 1:04a 9.93 3.08
8/06 Sat 4:07p 11:04p 6.95 6.95
8/07 Sun 2:59p 1:31a 10.53 10.53
8/09 Tue 4:50p 9:48p 4.96
8/10 Wed 3:10p 12:55a 9.75
8/11 Thu 4:57p 10:30p 5.55
8/12 Fri 3:09p 3:32a 12.38
8/14 Sun 3:04p 1:14a 10.16 2.81

TIA--
kalika


+-------------------------------------------------------------------+
|Filename: Untitled.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=3747 |
+-------------------------------------------------------------------+

--
kalika
------------------------------------------------------------------------
kalika's Profile:

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



  #3   Report Post  
kalika
 
Posts: n/a
Default


Thank you Bob!!
That worked beautifully, and i don't mind the extra column.
I changed the formula in G2 to:
=IF((MAX(0,F2-40))E2,E2,(MAX(0,F2-40)))
to get the portion of the day spent in overtime.
But that weekly tally of hours had me really confused.
I'm gonna have to study that formula and figure it out.

Thanks again--
kalika :)


--
kalika
------------------------------------------------------------------------
kalika's Profile: http://www.excelforum.com/member.php...o&userid=26651
View this thread: http://www.excelforum.com/showthread...hreadid=399380

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
formula for filtering and a defaulting date Sue Excel Worksheet Functions 3 July 26th 05 02:18 PM
MIN within range based on criteria StevenL Excel Discussion (Misc queries) 9 July 11th 05 11:33 PM
Update cell based on date range deversole Excel Discussion (Misc queries) 3 July 6th 05 01:58 PM
HOW TO USE A FORMULA TO CHANGE CELL COLOR ACCORDING TO DATE RANGE. terry Excel Worksheet Functions 2 December 27th 04 04:07 AM
Need to find Min value based on date range entered Chad S Excel Worksheet Functions 1 October 28th 04 09:52 AM


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