Count cells w/values in column if the data in column a matches cri

M

mdcgpw

I need a formula that counts the number of cell that contain data in column B
as long as the corresponding cell in column A matches a given criteria.
 
P

Pete_UK

Try this:

=SUMPRODUCT((A1:A100=D1)*(B1:B100<>""))

where D1 contains the criteria.

Hope this helps.

Pete
 
R

Rick Rothstein

That will only work in XL2007 (earlier versions need delimited column ranges
for its arrays). I think I would use delimited ranges even in XL2007
however... not sure how efficient it would be to let array calculations
extend across one million plus rows.
 

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

Top