View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Pete Rooney Pete Rooney is offline
external usenet poster
 
Posts: 56
Default SUMPRODUCT with "Contains" criteria

Max,

Awesome - Singapore to Cheshire UK in less than 5 minutes.

Thank you very much! :-)

Pete

"Max" wrote:

One way

In C1:
=SUMPRODUCT(--ISNUMBER(SEARCH("1A",A1:A100)),B1:B100)

Replace SEARCH with FIND if you need it to be a stricter case sensitive
search. SEARCH is not case sensitive.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Pete Rooney" wrote:
Good afternoon,
Is there any way in which SumProduct can be used with a "contains" criteria
- for instance, A1:100 contains product codes (for example) AZ1A1100,
ABCZ1A1200, 1A1300 and B1:B100 contains total sales for these products. I
want to extract values from column B for (for example) all products that
CONTAIN the string "1A".
I realise that I could use LEFT, RIGHT or MID as long as the "1A" appears in
the same place in the string, but I want something to cater for the times
when it doesn't.
Thanks in advance
Pete