Using -- is just slightly better.
Here is what Donkeyote said about it:
If you use the above method then you can include the header row without issue... but double unary approach means each array must identical in terms of dimensions
If you use the multiplication method (which does not nec. have this requirement) then it follows given the explicit coercion taking place your summation range should not include non-numerics.
Basic example:
=SUMPRODUCT(--({TRUE,FALSE,TRUE}),--({TRUE,TRUE,TRUE}),{"a",1,2}) -> 2
the "a" in the summation range will be ignored in similar vein to a SUMIF ignoring non-numerics in sum_range (no explicit coercion taking place)
Conversely
=SUMPRODUCT({TRUE,FALSE,TRUE}*{TRUE,TRUE,TRUE}*{"a",1,2}) -> #VALUE!
the "a" here causes an issue as it's explicitly coerced given * - hence 1*"a" -> #VALUE!
For more info. on SUMPRODUCT see Bob Phillips' white paper: http://www.xldynamic.com/source/xld.SUMPRODUCT.html
Bookmarks