ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how can i adapt this formula? (https://www.excelbanter.com/excel-programming/334555-how-can-i-adapt-formula.html)

Gary Keramidas[_2_]

how can i adapt this formula?
 
=SUM(IF(NOT(ISERROR(C6:H6)),C6:H6),0)

i need to skip column D

--


Gary




abcd[_2_]

how can i adapt this formula?
 
=IF(NOT(ISERROR(C6)),C6) + SUM(IF(NOT(ISERROR(E6:H6)),E6:H6),0)

Gary Keramidas[_2_]

how can i adapt this formula?
 
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)




stanshoe

how can i adapt this formula?
 

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)





Gary Keramidas[_2_]

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)







abcd[_2_]

how can i adapt this formula?
 
I can not talk for him, but I understood it an other way:
it seems he was happy with its formula, and wanted to change
(excluding a column from it).

So, it seems he wants to add all the non error columns (having a non
error result, counting error cells as zeros)


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com