Sumproduct with OR
Thnaks, I appreciate the shortcut since, in reality, my search includes 13
items, not just the three I simplified down to in my query. I implemented
Sandy's approach and it worked, but will try yours on the second one I have
to do.
"Harlan Grove" wrote:
"Sandy Mann" wrote...
This seems to work:
=SUMPRODUCT(--((ISNUMBER(SEARCH("A",RangeA)))
+(ISNUMBER(SEARCH("B",RangeA)))+(ISNUMBER(SEARCH( "C",RangeA)))=1),
--(RangeB="Baltimore"))
....
It should work, but there are shorter ways to do this.
=SUMPRODUCT(--(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(rangeA,"A",""),
"B",""),"C","")<rangeA),--(RangeB="Baltimore"))
which doesn't scale up well, or
=SUMPRODUCT(--(MMULT(--ISNUMBER(SEARCH({"A","B","C"},rangeA)
/(rangeB="Baltimore")),{1;1;1})0))
which does.
|