Hello,
Oops. Just spotted that. The formula in M10 should be:
=IF(AND(O9>40,O10>40),K10,IF(O10>40,O10-40,0))
copy this down as far as required.
The reason I have blank cells, is that in the FILE, OPTIONS, ADVANCED. Display Options for this Worksheet, I have unchecked the display zeros...