how to say "If the formula in this named range returns an error, then the value is one, else zero" in Excel -


hi guys ask simple question,how "if formula in named range returns error, value one, else zero" in excel? thinking "if (a1:a200 returns error, 1, 0).

i attach screenshot guys see trying do, cells in red ones contains error.

enter image description here

thanks guys, appreciated.

you can use sumproduct , iserr (or iserror, see note below on difference between these) functions. count number of errors in range:

=sumproduct(--iserr(a1:a200)) 

enter image description here

then, wrap in if, like:

=if(sumproduct(--iserr(a1:a200))>0,1,0) 

enter image description here

here explanation of how functions work.

note: iserr counts errors except #n/a. if want count #n/a, use iserror function instead of iserr.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -