I'm putting together a spreadsheet in Google Sheets to keep track of my nutrition and weight loss.

I want to make 2 charts, 1 that will display my weight over time and one that will display my calorie changes so I can compare the two. I have an issue with the calorie chart. On my tracker sheet I have columns I enter my protein fat and carb amounts and then the total calories get calculated using the formula below and entered in a separate cell.

=SUM(K12 * 4)+(L12 * 9)+(M12 * 4)

My problem is, these cells will always display a zero which messes up the look of the chart. I was wondering if there was a way I could use the SUM formula above or a different formula that would not automatically display a zero.

  • A fairly simple array formula would accomplish this. However, I'd need to see the sheet to know the range and parameters. If you'd like, share a link to your sheet (or to a copy of it), being sure to set the link's Share permission to "Anyone with the link..." and "Editor" when you create it.
    – Erik Tyler
    Apr 8, 2021 at 2:40
  • Welcome. Please remember that as per site guidelines when an answer addresses your question, you should accept it and even upvote it so others can benefit as well. Apr 9, 2021 at 1:59

1 Answer 1


You can use this formula instead

=IF(K12="","",SUM(K12 * 4)+(L12 * 9)+(M12 * 4))

This formula says:
If cell K12 is empty, show empty. If not, show the result of SUM(K12 * 4)+(L12 * 9)+(M12 * 4))

  • 1
    Thanks so much, that works perfectly :)
    – lexiDSP
    Apr 9, 2021 at 9:42
  • Glad I could help. Apr 10, 2021 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.