Selected Answer

As for the formula you asked about, here is my suggestion.

`=IFERROR(Monthly!D2-IF(WEEKDAY(D$1,1)=1,0,8/24),0)`

Note that *WEEKDAY(D$1,1)* returns the day number based on a week starting on Sunday. Therefore the test *IF(WEEKDAY(D$1,1)=1* determines if the weekday is a Sunday. Further note that Monthly!D2 contains hours in date format, inherited from Daily!I3. In that format 1 hour = 1/24. So, the above formula takes the value of Monthly!D2 and deducts 8 hours from it, unless it's a Sunday in which case 0 is deducted.

This formula will result in an error if Monthly!D2 contains a letter instead of a number. Observe at this point that "" (possibly inserted by your formula there) would also cause such an error but 0 wouldn't. The *IFERROR()* function catches the error and inserts a 0 in that case. You may like to replace this with "" in order to have a blank cell. My recommendation would be to keep the zero so as to be able to do calculations with it but suppress its display using the cell format or even suppress display of zeroes globally for the entire worksheet.

In the case of your worksheet there would be no immediate difference because you use the *SUBTOTAL()* function for calculation which converts strings to zeroes. *SUM()* does the same. The null string would cause an error if you were attempting to do multiplications with it, such as calculating overtime pay.