how to count cells...

  • Thread starter Thread starter hal9000
  • Start date Start date
H

hal9000

how to count cells that contains string AAAA in cell P1 to
P222 AND also contains string BBBB in cell B1 to B333?
something i imagine is:
 
Hi

As you used AND to bind 2 conditions, you can drop B223:B333 part for 2-nd
condition. Then
=SUMPRODUCT((P1:P222="AAAA")*(B1:B222="BBBB"))
 
=SUMPRODUCT((P1:P222="AAAA")*(B1:B222="BBBB"))

thank you for the reply.
is it possible to use wildcards?
the asterisk and the question mark does not work; ie,
=SUMPRODUCT((P1:P222="A*")*(B1:B222="B*"))
=SUMPRODUCT((P1:P222="A???")*(B1:B222="B???"))
 
Hi

Why not
=SUMPRODUCT((P1:P222>="A")*(B1:B222>="B"))
=SUMPRODUCT((P1:P222>="A")*(P1:P222<"B")*(B1:B222>="B")*(B1:B222<"C"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

A Macro to Insert Rows 1
Using VBA to rearrange data 0
Formula for cells 1
Pivot table question 1
Relative Macro Help on Keystrokes 9
Macro questoins 2
SUMIF? Or other? 2
Count Using Multiple Columns 4

Back
Top