View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme[_3_] Bernard Liengme[_3_] is offline
external usenet poster
 
Posts: 1,104
Default How do I count the number of items that meet 2 criteria?

While COUNTIFS is nice, SUMPRODUCT can do the same

=SUMPRODUCT(--(H6:H1000<AB1),--(LEFT(C8:C1000)="6"))

Do not try to use full column references other than in XL 2007
=SUMPRODUCT(--(H:H<AB1),--(LEFT(C:C)="6")) ' No No No

For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"2seas" wrote in message
...
What I'm trying to do is count how many invoice numbers starting with 6
where
completed by a certain date. I've got a column with the date it was
completed and a column of invoice numbers.

Here's what I have so far:
for the date =COUNTIF(H6:H1000,"<"&AB1)
for the invoice numbers =COUNTIF(C6:C1000,"6*")

I just can't get it where it counts them if the row matchs both.

I'm useing Excel 2003 and I'm not allowed to upgrade it, otherwise I would
use the COUNTIFS function in Excel 2007.