# Two cells which have formulas stopping error messages show an error when added !

1. ## Two cells which have formulas stopping error messages show an error when added !

Long title, sorry.

Please see the attached sheet. I am trying to add together two figs which are linked to calculations which have formula built in to stop error messages when there is a 0 / 0 = #value type error.

However when these two cells are added, if the cells are blank I get an error message. And if only one cell has a value, I get "" with my existing formula.

Could anyone let me know what I need to do to get a result of 7 if for example cell A4 = "" + B4 =7. At the moment my formula shows "" in the sum total of these cells

Any help appreciated, an example attached.

Thanks  Register To Reply

2. ## Re: Two cells which have formulas stopping error messages show an error when added !

I would suggest you revert to SUM, ie

C5: =IF(COUNT(A5:B5),SUM(A5:B5),"")

(for an explanation as to why SUM will work and + will not see: http://www.excelforum.com/excel-gene...no-result.html ... bear in mind a Null ("") is a text string)  Register To Reply

3. ## Re: Two cells which have formulas stopping error messages show an error when added !

Hi,

Sorry on my original document the columns that need to be added are not adjacent to each other, they are E and G, so I cant us E5:G5 as there is a value in F.

Is there an alternative?  Register To Reply

4. ## Re: Two cells which have formulas stopping error messages show an error when added !

on which basis:

=IF(COUNT(E5,G5),SUM(E5,G5),"")  Register To Reply

5. ## Re: Two cells which have formulas stopping error messages show an error when added !

Spot on thanks. just a comma eh?

Great help as usual  Register To Reply

6. ## Re: Two cells which have formulas stopping error messages show an error when added !

Yes certain functions like SUM, COUNT, COUNTA etc can accept a variable number of inputs (delimited by comma) whereas others like say COUNTBLANK etc can not (single contiguous range only) - if in doubt check out the XL Help file - they're generally (though not always) pretty good.

(also as you type in the formula you should get a rough idea of what can be added by means of the "tooltip/hint" text that appears).  Register To Reply