Forum Discussion
chris_chartrey
Dec 14, 2023Copper Contributor
smallest value of 2 values
I am trying to make a spreadsheet for PTO accruals. the formula is HRS worked / a fixed value for PTO accruals. this equates to a set value for a weekly PTO accrual. if a min amount of HRS worked is not met than the min amount of PTO hrs. is not established thus the accrual rate needs to be calculated at the lower rate otherwise the standard rate needs to be calculated. if overtime is worked than only the standard rate shall be calculated. I will give a example. if you work 40 hrs. you will accrual 1.6 hrs. PTO if you work 70 hrs. you would accrual the max 1.848 hrs. a week hrs.' of PTO etc. it's a 46.2*0.04 calculation for PTO on a 200-hr. working over 4.33 weeks a year giving 8 hrs. an 8 hrs. a month program. i am trying to make a spreadsheet that will automatically halt the value at 1.848 but retain any value under such value. thank you for any help!
- Riny_van_EekelenPlatinum Contributor
That could be:
=MIN( 1.848, hours_worked * 0.04 )
It will calculate hours_worked X 0.04 and will always return the lower of that calculation and 1.848.
hours_worked, obviously, refers to a cell with the hours worked.