Guys,

What I found to work in Excel was to keep a running total by week of the

number of hours worked. Then if the running total was between forty and

forty eight hours some of that day's hours were regular time and some were

overtime. Similarly, if the running total for that week was between sixty

and sixty-eight hours some of the day's hours were overtime and some were

doubletime. The only other cases I needed to worry about were hours that

fell below the threshold and hours that exceeded the threshold plus eight

hours. A running total less than forty hours and everthing was overtime. A

running total between forty-eight and sixty hours and everything is overtime

for that day. A running total that was more than sixty-eight hours and

everything is double-time. The rest of the possibilities all return zero in

my logic.

I have three business rules implemented in three Property Get statements

that contain the above logic. I gave up the idea of trying to run all this

each time the timesheet report is run and am keeping these numbers in a

table. My data entry form has an event which triggers a bit of VBA that

posts a new row to my totals table for each employee/project/day worked. On

the output side I use my results table to slice & dice the data to my

heart's content.

It works, it isn't perhaps the prettiest way to do this, but I am happy with

it for now. I still hope someone else out there knows what the accepted

best practice is.

--

Alan Webb

kn*******@SPAMhotmail.com
"It's not IT, it's IS

"Alan Webb" <kn*******@hotSPAMmail.com> wrote in message

news:fN********************@comcast.com...

Guys,

I get this:

Regular Hours are any hours less than the number of hours that can be

worked before the hours begin to be counted as overtime in the period.

Overtime Hours are any hours more than the number of hours that can be

worked as regular hours in the period.

Doubletime is similar to overtime but at a higher limit.

If we are doing this on a per day period then anything between eight and

twelve hours is overtime and anything more than twelve hours is

doubletime. This one is easy and I have three functions that work together

to give me the numbers I want for counting regular, overtime and

double-time per day.

And if we are counting by week it's still similar: regular hours are

anything less than the regular hour limit.

It's overtime and doubletime per week that is frying my brain. I tend to

overcomplicate things and at the moment I have a contorted If End if

construct that looks at four break points. The first is the regular hours

limit, the second is regular hours limit plus eight, the third is the

overtime limit less eight and the fourth is the overtime limit. I have

different arithmetic depending on how many hours that week and where that

total falls in my four break points. Is there a simplier logic &

companion arithmetic?

--

Alan Webb

kn*******@SPAMhotmail.com

"It's not IT, it's IS