writing formulas in excel for payroll



I'm very inexperienced with excel, I'm trying to write a formula that
will total five days up to and including 40 hrs, then put anything over
the 40 hours into another column titled overtime.

I also would like to asign a value to letters; e.g. S=8hrs (sick time)
and have the 8 hrs deduct from another connected *** with the total
amount of sick hours available to the employee. For example if the
person starts the year with 24 hours of sick time to use, and when I
enter an "S" in a column it will automatically put in 8hrs and change
the other *** from 24hours to 16hours.

Please help!! :-)

.