Then drag the fill handle down to the cells that you want to apply this formula and all the total hours worked. In the example shown the formula in D5 is. However in addition Excel ignores the hours that exceed 24.
Now the total working.
IFC5 B5 C5 - B51 - B5 C5. Another simple technique to calculate the duration between two times in Excel is using the TEXT function. Then drag the fill handle down to the cells that you want to apply this formula and all the total hours worked. Now the total working.