Mar 25 2022 03:21 AM
Dear discussion members,
I have tried finding if there is an issue already addressed with my problem, and I have not been able to find any to date.
Therefore I need your kind assistance and draw upon far more expertise than I have.
I am putting together a spreadsheet to calculate my wages and I am trying to find a solution for the following problem:
1. I am paid a penalty rate of 15% for working the hours from 8:00pm to 7:00am the following morning.
2. My start and end times may vary, depending on the shift allocated to me.
For example some days I may start at 5.00pm and finish at 1:30am, other days I may start at 9:00pm and finish at 10:00am.
Generally there is a 50 minute break.
3. So as you can see some hours are not paid a penalty rate, that is if I am working before 8:00pm and conversely if I finish after 7:00am.
How do I calculate those hours not incurring the penalty rate and those hours that are incuriing the penalty rate.
Thank you for kind help .. Michael
Mar 25 2022 03:45 AM
Could you attach a sample workbook without sensitive information, or make it available through OneDrive, Google Drive, Dropbox or similar?
Mar 26 2022 07:20 PM
Mar 26 2022 07:35 PM
Hi Hans,
Please find attached the workbook I have been working on.
I hope you have received my previous post re the reason for my inquiry.
Also note I am using an old laptop with an old version of excel.
I have a number of issues to resolve,
1. I am trying to calculate a penalty rate. A friend has tried to help but we are having problems as you can see.
For example if I am not working on that day then I still have a default of 4 hrs is calculated, and we cannot calculate the 2nd. half.
2. Another issue is I have to build a VLOOKUP so that when I enter in a Work Status (Column C and Drop Down List sheet)) information is calculated by the specific cell. For example if I have annual leave the default time of 8 hrs will show in column AA. Conversely if I am sick it will show in AB.
Anyway step-by-step. Right now I need to resolve the penalty rate issue.
Once again thank you ... Cheers Michael
Mar 27 2022 06:07 AM
SolutionIn the attached version, I have cleared the start and end times for day you don't work,
Instead of first calculating the penalty hours, I have first calculated the normal hours, then calculated penalty hours as total - normal.
Mar 27 2022 06:19 PM
Mar 28 2022 03:49 AM
You cannot use a formula for the start time, since you want to be able to enter the start time manually in most situations. It would be possible to use VBA code, but that might be overkill:
In the version I attached to my previous reply, I already entered formulas in columns AA and AB to fill in annual leave hours and sick day hours based on work status.
Mar 29 2022 08:24 PM
Thank you Hans,
I was not expecting you to help me so much, that is why I did not notice what you kindly did to help me.
How do I arrange a case of beers to be sent to you ???
Cheers ... Michael
Mar 29 2022 11:58 PM
Thanks for your kind offer, much appreciated, but that's not necessary.
Apr 25 2022 12:21 AM
Hi Hans,
I sincerely need your help again, if possible. I do feel I am intruding on your time and knowledge and for that reason I am uncomfortable, but in this instance I look to you as my on line mentor
I have 2 issues I am struggling with, and I have attached the workbook file;
Issue #1.
I refer to the worksheet "Penalty Rate Calculator". It has occurred to me that I did not include the Voluntary Overtime worked into the penalty rate hours. I went ahead and gave it my best shot thinking I should be able to insert the same formulas from the 2nd. half but it is not working for me.
Where am I going wrong? And on that basis, so I can learn more, is it possible to explain how you put the formulas together? If that is touching on your intellectual property I understand and withdraw that request.
Issue #2.
I refer to the worksheet "Work Calculator", specifically Broken Shift Penalty, (cells highlighted in yellow).
A broken shift is where I drive the bus for maybe 4 hours in the morning peak period. I then have maybe a 4 hour break, then re-commence my shift driving for maybe 4 hours in the evening peak time. Note these drive times and subsequent break may vary.
I am then paid an increase in my hourly rate if I drive a bus for longer than 9.5 hours. (an explanation is entered in "Calculator Parameters" A45 - ITEM 7. BROKEN SHIFTS
Basically if I drive a bus for 9.5 to 10.5 hours I am paid at a rate of time and a half. Thereafter I am paid at double time.
I have created a number of different scenarios in Work Calculator.
Thanking you in advance,
Michael
Apr 25 2022 02:39 AM
Hi Mike.
About Issue #1: you did it correctly, but you made one tiny mistake: in the penalty formula for Sunday, you multiply with 0 to cancel the penalty. In column U, you then filled the formula down from Sunday, causing ALL penalties in that column to be canceled.
Here follows a lengthy explanation of the formula.
The formula in columns F, M and T calculate normal working hours. In F7:
=IF(C7="","",24*(MAX(MIN(D7+(D7<C7),TIME(20,0,0))-MAX(C7,TIME(7,0,0)),0)+IF(D7<C7,MAX(D7-TIME(7,0,0),0),0)))
The formula first checks if the start time in C7 has been filled in. If not, it returns a blank "".
Otherwise, it calculates the normal working time, and multiplies the result with 24 to convert the time to decimal hours. The actual calculation consists of two parts:
MAX(MIN(D7+(D7<C7),TIME(20,0,0))-MAX(C7,TIME(7,0,0)),0)
and
IF(D7<C7,MAX(D7-TIME(7,0,0),0),0)
In the first part:
MIN(D7+(D7<C7),TIME(20,0,0)) is the end time, but if if is later then 20:00 (8 PM), take 20:00.
MAX(C7,TIME(7,0,0)) is the start time, but if it is earlier than 7:00 (7 AM), take 7:00.
We subtract the start time from the end time, but if the result is negative (because working time falls outside normal hours), take 0.
The second part only applies if end time is before start time in clock time, i.e. start time is before midnight and end time is after midnight, for example start=23:00 and end=8:00. In that case, MAX(D7-TIME(7,0,0) calculates the time worked after 7:00 (7 AM). If this is negative because end time was before 7:00, take 0.
I'll tackle Issue #2 in my next reply.
Apr 25 2022 02:51 AM
Issue #2: see the attached version.
Apr 28 2022 04:29 PM
Apr 29 2022 12:28 AM
@Mike_Geraghty Hi Mike,
That's very nice of your wife. I live in Europe, so it won't be possible, but please tell her that I really appreciate the idea!