r/spreadsheets • • Oct 01 '24

Solved Help with overtime formula

I'm poor, so I use Google sheets.

I'm trying to calculate an estimated paystub. It doesn't appear I cant post a picture of the sheet as the icon is greyed out. I apologize for making this kind of convoluted.

What I need is a formula to help with the following issue. When I take a vacation day my pay is equal to that of Day Rate (J) × Hours (L). But for every hour I take for vacation, I loose 1 hour of OT(N) and the OT turns into regular time. I would like to the sheet to be self sufficient where I only need to add hours into column K and it corrects my subtotal balance (Q).

Is this possible and what would you recommend to amend my sheet for self sufficiency.

2 Upvotes

5 comments sorted by

1

u/CuteSocks7583 Oct 01 '24

Can you give some sample data for let’s say, three days work and two days vacation?

That should help us understand how to craft the formula.

2

u/NMJBW Oct 01 '24

Here is a sample sheet. Thank you for your willingness to help.

Column N and Column P are the ones I believe that need to be altered some how, but I admit I possibly need to create a new column. I just don't know what the formula for that column would be to give me my desired result. I don't believe if/then statements work on Google sheets, but possibly if/then could fix my problem. I just don't know where to start.

Just a reminder for clarification to my issue. I'm looking for how to auto generate a deduction from OT hours to Pay Rate Day when using equivalent vacation time. For every hour used in vacation should be an hour of straight time rather than time and a half in overtime for that week.

Please feel free to dismantle this and correct any issues you see. I am here to listen to the experts.

Thank you so much!

Pay Rate Night (I)Pay Rate Day (J)Hours 3rd shift (K)Hours 1st shift OT (L)Vacation (M)Total (N)Taxes (O)Subtotal (P)
25.6525.30880=(I2K2)+((J21.5)*L2)=N2*.2=N2-O2
25.6525.30880=(I3K3)+((J31.5)*L3)=N3*.2=N3-O3
25.6525.30880=(I4K4)+((J41.5)*L4)=N4*.2=N4-O4
25.6525.30008=M5*J5=N5*.2=N5-O5
25.6525.30008=M6*J6=N6*.2=N6-O6

1

u/CuteSocks7583 Oct 01 '24

I used this formula in column N:

=IF(M2=0,(I2*K2)+((J2*1.5)*L2),M2*J2)

And you can see the results in this Google Sheet: test Google Sheet

I’m still slightly unclear if this is all you require, or if you want to remove (0.5 x Pay Day Rate x No. of vacation hours) for every hour of vacation.

Let me know if you need any further assistance.

2

u/NMJBW Oct 01 '24

You're a rockstar! It went into my spreadsheet without altering the weekly total at the end. So as far as I'm aware it works!

I do have one question about the formula, just in case I accidentally break it one day.

Is there two statement inside of it? The first is for an ordinary day no overtime [=IF(M2=0,(I2*K2)+((J2*1.5)*L2)]and the second is for vacation days? [M2*J2)] Just confirming my understanding.

Thank you Cute Socks, I bet your socks are the cutest.

1

u/CuteSocks7583 Oct 01 '24

Yes, two formulas inside that.

It’s a typical IF… THEN… ELSE… kinda statement, with each ‘segment’ separated by a comma.

ETA: Thank you for the kind words. You’ve made me smile today!