In R39 you have:
=IF(ISBLANK(C39),"",C39)+Q39
You are getting #VALUE result in R39 because you are trying to add the result of Q39 (which is "") to the result of the test for ISBLANK() which is also "".

Change the formula in R39 to:
=IF(ISBLANK(C39),"",C39+Q39)
to get blank results.