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

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

Post by bWRjZ3B » Tue, 13 Jan 2009 05:29:01


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.
 
 
 

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

Post by Pete_U » Tue, 13 Jan 2009 05:45:05

Try this:

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

where D1 contains the criteria.

Hope this helps.

Pete

 
 
 

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

Post by U2hhbmUgRG » Tue, 13 Jan 2009 05:54:03

Hi,

=SUMPRODUCT(--(A:A=C1),--(B:B<>""))

Here the criteria is in C1.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire
 
 
 

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

Post by Rick Roths » Tue, 13 Jan 2009 06:00:12

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.

--
Rick (MVP - Excel)


"Shane Devenshire" < XXXX@XXXXX.COM > wrote in