Leave cell blank where the sum is = to 0.

pdeemartin58

New Member
Joined
Feb 4, 2025
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I want to sum the values for a range of cells but want the cell to remain blank if the formula returns a value of 0. I'm sure it's a simple formula but I've googled and read a lot of FAQs but haven't been able to get the correct formula for my needs.

Thank you in advance
Patrick
 
Excel Formula:
=LET(S,SUM(A1:B2),IF(S=0,"",S))

where A1:B2 is "a range of cells"
 
Upvote 0
Excel Formula:
=LET(S,SUM(A1:B2),IF(S=0,"",S))

where A1:B2 is "a range of cells"
My range of cells is K19:M19. When I enter =LET(S,SUM(K19:M19),IF(S=0,"",S)) it returns #NAME? whether or not there are any values in that range.
 
Upvote 0
It sounds like you do not have the LET function. Are your really using Excel 365?

If not, this should work:
Excel Formula:
=IF(SUM(A1:B2)=0,"",SUM(A1:B2))

Note that you could also use Conditional Formatting or Custom Formatting to simply hide the zeroes.
 
Upvote 0
You could also just do:
=SUM(K19:M19)

and use a custom number format on this cell: General;-General;
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top