View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Count Number of Rows

Use cells to hold your criteria.

F1 = criteriaA
G1 = criteriaB

Then:

=SUMPRODUCT(--(A1:A10=F1),--(B1:B10=G1))

--
Biff
Microsoft Excel MVP


"Boying Opaw" <Boying wrote in message
...
In a given range, I only want to count the rows when certain columns
satisfy
corresponding criterias. How do I do this?

Say I have Rows 1 to 10 and Columns A to D. I only want to count the rows
when the content of A = criteriaA and the content of B = criteriaB. What
formula do I use?