View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas[_2_] Gary Keramidas[_2_] is offline
external usenet poster
 
Posts: 364
Default how can i adapt this formula?

tried that and it didn't work in all cases. it evaluates to a zero
sometimes. the formula in the other response works all the time.

--


Gary


"stanshoe" wrote in message
...

Gary-

If I understand your formula, you are trying to sum the value of the cells
in the range if none of them contain an error value. If there is an
error
value in the range, you want to return 0.

The isError funciton returns a value indicating whether an expression, not
a
range, is an error value. Try this formula to see if it does what you
want.
It returns the sum of the range if the sum expression does not evaluate to
an
error value or 0 if it does.

=IF(NOT(ISERROR(SUM(C6,E6:H6))),SUM(C6,E6:H6),0)

Within the SUM function, you can separate discontinuous ranges with a
comma.

Stan Shoemaker
Saratoga, CA



"Gary Keramidas" wrote:

thanks, i was trying to combine the c6,e6:h6 instead of separating them
and
adding the result

--


Gary


"abcd" wrote in message
...
=IF(NOT(ISERROR(C6)),C6) + SUM(IF(NOT(ISERROR(E6:H6)),E6:H6),0)