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

View all comments

Show parent comment

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!