If Formula with Sum to replace 0 with Hyphens

Manny74

Board Regular
Joined
May 6, 2016
Messages
124
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All, I am trying to create a formula to replace a blank or zero with a hyphen for each quarter...I feel as though I am close to figuring this out.
for 1st Qtr, I typed =IF(C3+D3+E3=0,"-",SUM(C3:E3)) and it seemed to work..
But couldn't I type =IF(SUM C3:3=0,"-",SUM(C3:E3)) ?


COLUMN BCDEFGHIJKLMNOPQR
ROW 2 JanFebMar1st QtrAprMayJune2nd QtrJuly AugSept3rd QtrOctNovDec4th Qtr
ROW 3Complaints-000
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
How about
=IF(SUM(C3:E3)=0,"-",SUM(C3:E3))
 
Upvote 0
just add an E instead of ":3" do ":E3"
 
Upvote 0
When I use =IF(SUM(C3:E3)=0,"-",SUM(C3:E3)) I get #NAME?
 
Upvote 0
Oh sorry, I mistyped the formula....
But when I try =IF(SUM C3:E3=0,"-",SUM(C3:E3)) I get the following message (see attached image)
 

Attachments

  • MS EXcel - We found a problem.JPG
    MS EXcel - We found a problem.JPG
    37.9 KB · Views: 9
Upvote 0
That's because it's no a valid formula.
 
Upvote 0
Oh sorry, I mistyped the formula....
But when I try =IF(SUM C3:E3=0,"-",SUM(C3:E3)) I get the following message (see attached image)
=IF(SUM(C3:E3)=0,"-",SUM(C3:E3)) This works for me
 
Upvote 0
Why go through all the trouble of using formulas?
Just use a Custom Format to show the dash for zero values, like Scott says.

The issue with returning text values it is going to preclude you from using those values in any other mathematical computations (i.e. you would not be able easily use those values in other sums, etc).
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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