I am supposed to calculate gross payment including over time useing
the if function and I can not for the life of me figure it out help please
For a real life situation, this can be very complicated, depending on
your state's or jurisdiction's overtime laws. But if this is for a
class assignment, the solution can be very simple.
If A1 contains gross pay per hour, B1 contains number of hours, and
the rules are "time and half over 8 hours", the gross pay might be:
=A1*B1 + if(B1<=8, 0, A1*(B1-8)/2)
There are other ways to express the same thing. But if the class
assignment is learn about IF(), stick with one of two solutions that
use IF().
PS: Another solution is:
=if(B1<=8, A1*B1, A1*8 + 1.5*A1*(B1-8))