Forum Discussion
Sam_French
Mar 01, 2023Copper Contributor
Remainder of 40 in one column to another Column
Hello!
I hope someone can help. I'm working with time cards and making a spreadsheet. I have an employees total hours in Column E and would like any hours over 40 to go into Column F (for overtime).
So for example if Column E is 42 hours, then I want Column E to only show 40, and the 2 additional hours over 40 to go to Column F
Thank you so much!
If no formula in E and value appears here by some magic way, I'd suggest to add two columns, with regular hours and overwork
Regular: =IF(E2<=40,E2,40) Overwork: =MAX(0, E2-40)
How 42 hours appear in E, do you enter it manually or it's calculated by formula? If the latest by which one?
- Sam_FrenchCopper ContributorIts placed on there when I run a hourly report from our time clocks, but it doesn't separate regular hours and overtime hours. It doesn't appear to have any formulas on it.
If no formula in E and value appears here by some magic way, I'd suggest to add two columns, with regular hours and overwork
Regular: =IF(E2<=40,E2,40) Overwork: =MAX(0, E2-40)
- Patrick2788Silver Contributor
You could use:
=LET(total,SUM(hours),IF(total<=40,total,HSTACK(40,MOD(total,40))))
This will do regular and any OT, all in one move.
- Sam_FrenchCopper ContributorThank you, but I can't seem to get this to work with what I want it to do