If c7 is more than 40 put the amount over 40 in c8
You need to understand that a formula can only change the value of the cell
it is in. Formulas CAN NOT change the value of another cell. So, to do what
you want, put this formula in C8:
=if(c7>40,c7-40,0)
This formula will make C8 a zero if C7 is less than 40. To have C8 be blank
in this case, change the 0 in the above formula to "".