LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Function that groups together Overtime hours by 7.5 hrs

Working overtime, there are two options. Get extra money
or have some extra days off later.

The table below shows Overtime worked in May.

Line Date Hrs
---------------------
1 05/01 3
2 05/02 1,5
3 05/05 2
4 05/06 4
5 05/07 1
6 05/08 2
7 05/10 8

What I want to do here, is take the overtime out
in free time, 2 days in august (Aug the 1. and 2.)
in stead of getting extra paid on my salary.

I will have a wizard that asks for a Start date where
I will write aug.1. Duration; 2 days. What I now
want is a function that groups together hours in
work days with 7.5 hrs a day (full time) by setting
vacation date in the last column.

As you can see under neeth, I have done this manually.
It is easy math when you do it manually.
However I want to have a function to do this automatically.


Line Date Hrs Used for vacation
-----------------------------------------
1 05/01 3 08/01
2 05/02 1,5 08/01
3 05/05 2 08/01
4 05/06 4 08/02
5 05/07 1 08/01
6 05/08 2 08/02
7 05/10 8 (need to split this first - se below)
8 a function takes care of this an adds:
9 05/10 1,5 08/02
10 05/10 6,5 overtime salary

The challenge is to pick the rows that makes up the sum 7.5 hrs
that is one work day, without having to split moore rows than
necessary. Then I put the date for vacation in the last column.

The function will have to continue until all rows needed do have
a date for vacation. The left overs, 6.5 hrs will be used another
time or it can be paid out as overtime. Got it?

One strategy could be to start with the lowest amount of hrs and write
the aug.1 then
add the second lowest number of hrs and so on until it reaches
7.5. But that is not always the best solution I quess. Say I
picked 4, 1.5 and 2. That would be exactly 7.5 hrs even I did not
pick all the smalest numbers (hrs).

How can I write an optimal function here?
Any suggestions for an optimal solution (function) to this challenge?

Thank you very much for helping.

Regards
Jan

 
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
Work hours with overtime Debby_Jo Excel Discussion (Misc queries) 2 July 31st 08 12:29 AM
overtime hours formula Louie Excel Worksheet Functions 8 December 16th 07 09:41 PM
regular and overtime hours Curtis Excel Worksheet Functions 1 April 21st 07 06:32 AM
Overtime Hours Zack Excel Worksheet Functions 5 November 23rd 05 04:28 PM
need help w/formula for calculating overtime hours jv749297 Excel Worksheet Functions 1 January 17th 05 07:54 PM


All times are GMT +1. The time now is 08:31 PM.

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"