1

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.

2
  • 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 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. – marikamitsos Apr 9 at 1:59
0

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))

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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