count if

W

wc

I have a problem I want to count with multiply parameters.
ex.
tp403 e
lp602 p
tp601 e
tp403 p

I want to count when column 1 is tp... and column 2 is e. I can count, but
i have a problem with using wildcard *.
 
B

Bob Phillips

=SUMPRODUCT(--(LEFT(A1:A100,2)="tp"),--(B1:B100="e"))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
M

mrice

If you make an extra column which concatentate the two fields (maybe
with an unusual separator for safety), you can then use the COUNTIF
function on this.

tp403 e tp403|e
lp602 p lp602|p
tp601 e tp601|e
tp403 p tp403|p


=COUNTIF(C1:C4,"tp*|e") gives the value of 2
 
Top