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.
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))
then, wrap in if
, like:
=if(sumproduct(--iserr(a1:a200))>0,1,0)
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
Post a Comment