Need some help to do a planning with different formulas

Copper Contributor

Hello,
I try to do a planning with different formulas, some of which provide different possibilities.
* For each day, it would be necessary to calculate the number of hours on the day.
* Between two services, it would be necessary to calculate the number of hours elapsed and to display "ERROR" if there is less than 11h.
* Each week, the number of hours worked should be calculated.
* All these formulas should take into account the contents of the cells and execute only if there is the start time / end time and not if there is the word "CA", "CT", " "CH", "AT".

The first three formulas are simple but the problem becomes complicated with the last condition to be fulfilled.

c2 = formula of the number of hours between two services
c4 = formula for calculating the number of hours worked
d2 = formula to check the number of hours elapsed between the two services, if necessary "ERROR"
p4 = formula for calculating the number of hours worked over the week

2 Replies
This looks a very complex and I am not too sure it is doing what you want
in c2 you have =($B$4-C3)+($C$4+D3) and all the B4 cells are blank.
you could try something like =IF(C3="CH","ERROR",($B$4-C3)+($C$4+D3))

Thanks for your response. It seems appropriate for a single occurrence. In my situation, there are several. I do not know the IF nested functions at all. I think that is what I would need, except if another formula (easy to understand) exists. 

Regarding the content of cell C2, the "$ B $ 4" and "$ C $ 4" are cells that contain an hourly value. These cells are used to calculate the number of hours between two services.