Forum Discussion
Rachael_Dart
Mar 22, 2021Copper Contributor
Help with IF formula please
I am creating a spreadsheet to help me calculate our staff's payroll. I need a formula to help me work out the standard pay and overtime. So what I want excel to do is- If the hours in cell A1...
- Mar 23, 2021
Thanks! Your values are not a number of hours such as 41, but a time value such as 41:00
With a total time in E9, the formula for regular hours is
=MIN(E9,40/24)
and the formula for overtime is
=MAX(E9-40/24,0)
Format the cells with these formulas as [h]:mm
HansVogelaar
Mar 22, 2021MVP
Rachael_Dart
Mar 22, 2021Copper Contributor
Thank you for your kind reply. For some reason that is not working. Would it be because the number in Cell A1 is created from a formula itself?
- HansVogelaarMar 22, 2021MVP
The formula in A1 should return a number, not a text value.
- Rachael_DartMar 22, 2021Copper ContributorYes it does return a number. However, when I paste in the formula that you have very kindly posted, I am getting an answer of 41 which I should be getting an answer of 40. I am a bit stumped.
Thank you for your help.- HansVogelaarMar 22, 2021MVP
Could you attach a small sample workbook without sensitive information that demonstrates the problem?