Welcome to the forum.
You don't say if your hours are being entered as times or just as figures. This formula assumes the first (for example, 6½ hrs entered as 06:30):
This formula is for the second case (for example 6½ hrs entered as 6.5):
The difference is the lack of the division by 24 in the second formula.
The logic for both is this:
If A3 is a Sunday, result is the hours worked. This is the
blue part of the formula.
If it's not a Sunday, if it's a Saturday AND the hours worked are more than 5, result is the hours worked minus 5. This is the
green part.
If it's not a Sun or Sat and the hours worked are more than 8, result is hours worked minus 8. This is the
dark red part.
Otherwise a value of 0 is returned (if none of the conditions are met).
Hope that does what you want.
Edit: please note Richard's point below. I have assumed that the hours worked are all on one day. If that's not the case, then things get a lot more complicated (though still possible).
Bookmarks