sum - Excel Sumproduct with Flexible Inequality -
i'm trying write sumproduct references other cells inequality conditions. i'd able change direction of inequality (i.e. <, >, <=, >=) referencing cell text instead of hardcoding inequality in formula. possible?
this code works, $b7 , $d7 cutoff conditions:
sumproduct(--('data'!$a$2:$a$231>=$b7)*('data'!$a$2:$a$231>=$d7))
however, variations of code don't work, when use references inequalities:
sumproduct(--('data'!$a$2:$a$231 & $b1 & $b7)*('data'!$a$2:$a$231 & $d1 & $d7))
in above case, $b1 , $d1 both >=
is possible sumproducts? thanks!
sumproduct() cannot integrate comparison operator cell, sumifs , countifs can.
=sumifs(a2:a50,a2:a50,b1&b7,a2:a50,d1&d7)
a2 a50 has ascending whole numbers.
the condition not make sense, though, since both sumproduct , countifs use , combine conditions. in example both conditions use same operator, condition values greater d7 shown. it's logic issue, not formula one.
the formula demonstrates how combine comparison operators different cell countifs (or sumifs) formula.
Comments
Post a Comment