How do I select a constant time range from a variable time range using VBA
Hi All :-)
Can some one please offer some VBA help regarding the
following:
I am trying calculate employee earnings based on a
variable pay rate structure within a 24hr period. That is,
the employee pay rate e.g. Flat Rate, Time Plus Half,
Double Time etc varies according to the time of day
worked.
The actual hours submitted by the employee are however
specified within a single time range. Example: Total hours
worked = 07:00:00 to 20:00:00 = 13 hours
The VBA code would need to split out the variable pay rate
based on the example above i.e. (07:00:00 to 20:00:00 = 13
hours) as follows:
*** Split out below assumes hourly pay of 10 ***
07:00:00 to 16:00:00 - Flat Rate i.e. 9hrs * 10
16:00:00 to 00:00:00 - Time Plus Half i.e. 8hrs * 15
00:00:00 to 07:00:00 - Double Rate i.e. 7hrs * 20
Thus, the VBA code would determine that for hours
submitted by the employee, from 07:00:00 to 20:00:00
(13rs) ...
Thanks!