View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Michl
 
Posts: n/a
Default Counting based on values in two columns?

I agree with the pivot table, especially if there is alot of data.
However, to do this with a formula you could use the following:
=SUMPRODUCT(--(A1:A20="A"),--(B1:B20="Yes"))
Assuming, of coursem that the data ranges are equal in length and from
rows 1 through 20. Change the "Yes" to "No" to get the other value.

- John
www.JohnMichl.com