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
 
So for Total CY19, I simply entered =SUM(F3+J3+N3+R3)...
How can I create an If formula to place a hyphen in the cell if 1st QTR + 2nd QTR+3rd QTR+4th QTR equals zero?


COLUMNBCDEFGHIJKLMNOPQRS
ROW 2 JanFebMar1st QtrAprMayJune2nd QtrJuly AugSept3rd QtrOctNovDec4th QtrTotal CY19
ROW 3Complaints-000
ROW 4Grievances
ROW 5Positive Feedback
ROW 6Neutral Feedback
ROW 7Negative Feedback
ROW 8Total Surveys
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Same way we did before:

=IF(SUM(F3,J3,N3,R3),SUM(F3,J3,N3,R3),"-")

or without the SUM:
=IF(F3+J3+N3+R3,F3+J3+N3+R3,"-")
 
Upvote 0
When I used =IF(SUM(F3,J3,N3,R3),SUM(F3,J3,N3,R3),"-") I got a #VALUE! message...
 
Upvote 0
Does your version of Excel require semicolons instead of commas?
 
Upvote 0
Do you normally use commas in your formulas?

Also do any of F3, J3, N3 or R3 contain #VALUE!
 
Upvote 0
Wait, it seems to work now....maybe I missed something, but it works now...thanks!!
 
Upvote 0
So I used this formula to display hyphens when the cells are zero: =IF(SUM(F3,J3,N3,R3),SUM(F3,J3,N3,R3),"-")

But for 1st Quarter, what if Jan, Feb & March were truly zero, so then I would want 1st quarter to say zero.....

So it seems, if the cells are blank, there should be a hyphen in the appropriate Qtr....but if the cells have zeros, then the quarter should have a zero in it....

What formula would provide this?



COLUMNBCDEFGHIJKLMNOPQRS
ROW 2 JanFebMar1st QtrAprMayJune2nd QtrJuly AugSept3rd QtrOctNovDec4th QtrTotal CY19
ROW 3Complaints000----
ROW 4Grievances
ROW 5Positive Feedback
ROW 6Neutral Feedback
ROW 7Negative Feedback
ROW 8Total Surveys
 
Upvote 0
How about
=IF(COUNT(C3:E3)=0,"-",SUM(C3:E3))
 
Upvote 0

Forum statistics

Threads
1,217,133
Messages
6,134,840
Members
449,890
Latest member
xpat

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