C6 and C7 are not blank, so it's not doing the SUM. The formula is doing what you have told it to do, so working perfectly.