Sumproduct Wildcard issue

43 views Asked by At

I have the following formula in cell R5:

=SUMPRODUCT((I4:N28)*(B4:B28=R3)*(I1:N1="*"&R4&"*"))

I would expect it to return 120 but returns 0. It transpires I can not use wildcard in sumproduct() like I typically would with sumif(). Any help on incorporating a wildcard into sumproduct() is appreciated.

enter image description here

Many thanks, Alan.

1

There are 1 answers

0
Mayukh Bhattacharya On BEST ANSWER

Try using the following formula which uses SEARCH() Function.

enter image description here


=SUMPRODUCT((ISNUMBER(SEARCH(R4,I3:N3)))*(B4:B19=R3)*(I4:N19))

Another alternative way:

enter image description here


=SUMPRODUCT((1-ISERR(SEARCH(R4&"*",I3:N3)))*(R3=B4:B19)*(I4:N19))