I'm getting errors in overtime calculation in Numbers
I have my schedule and I have made a cell with the total hours worked in this case it is cell G2, I am trying to make a formula where if I work more than 40 hours it will automatically calculate the overtime. This is what I have. I keep getting this error: "Durations can’t be compared to other data types." I am very lost and any help would be greatly appreciated.
IF(DUR2HOURS(G2>40),(40×15)+(DUR2HOURS(G2−40)×22.5),DUR2HOURS(G2×15))
40 is hours worked
15 is rate of pay
22.5 is overtime pay
[Re-Titled by Moderator]
Original Title: Overtime calculation in Numbers
MacBook Air, macOS 15.6