Thread: Wildcard in SUM
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
theSquirrel theSquirrel is offline
external usenet poster
 
Posts: 27
Default Wildcard in SUM

On Jul 25, 4:02 pm, Dean wrote:
I'm hoping someone will add to be able to show me what I'm doing wrong. I'll
try to show a simple example.
Spreadsheet view:
A B C
1 11COH1092069/15 CPO 14
2 11COH1092069/15 14
3 11COH1092069/15 CPO 14
4 11COH1092069/14 14

Formula that I would like to use:
=(SUM(B1:B4="CPO")*(A1:A4="*2069/15*")*C1:C4)
It doesn't work, any ideas? Thx - Dean


I don't think I understand what you are trying to do with the
'SUM(B1:B4="CPO")' statement. It looks like you want to count the
number of times that "CPO" shows up in the range. If this is the
case, you should use 'Countif(B1:B4,"CPO")' instead.

As for the second expression '(A1:A4="*2069/15*")' it looks like you
want to use the same type of thing, but I am unsure about the
wildcards being correct. I think you will need to use some sort of
search or parse to see if the value has that particular string and
then count it. A bit more complex but not impossible.