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

  • Thread starter Thread starter mdcgpw
  • Start date Start date
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.
 
Try this:

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

where D1 contains the criteria.

Hope this helps.

Pete
 
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.
 
Back
Top