I have a spreadsheet that keeps track of work hours. Their are two cells for everyday of the week ("in" and "out"). At the end I have a cell for "total hours", I have a formula in that cell to add all the hours for the whole week, but I need something else. I need the formula to account for days that an employee works 5 or more hours and subtract 30 minutes or 0.5 hours for a lunch, but only on those qualifying days.

here is the formula I currently have (this is only for a single day of work)

=24*(IF(B6>C6,C6+1-B6,C6-B6))

"B6" is the "in" time and "C6" is the "out" time.

How can I add to this formula to say that if that day is >=5 then subtract 0.5?

Please... Somebody help me!!!