Thread: SUMPRODUCT
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default SUMPRODUCT

If you are searching for text values and one of those columns (eg B)
could contain blanks, then you might have to do this:

=SUMPRODUCT(--(A1:A5000=C1),--(B1:B5000=C2),--(B1:B5000<""))

Hope this helps.

Pete

On Feb 26, 8:16*pm, Chad Portman
wrote:
I am using excel 2003 and having issues with this formula. What I need is a
count of how many rows contain both condition one from column A and condition
two from column b. The formula I have right now is:

=SUMPRODUCT(--(A1:A5000=C1),--(B1:B5000=C2)

C1 and C2 are my two conditions. Now sometimes I can easily just auto filter
the data and count it and then manually type it but sometimes it is too large
to do this. The reason I mention this is in one case once filtered there is
only 5 rows that match both conditions but the formula returns 518. So I am
wondering if this is the right formula to find what I am truly looking for
cause it sounds to me that I almost need a couple COUNTIF's with a & in the
middle but I can not get that to work either. Thanks for any help