View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Trevor Shuttleworth
 
Posts: n/a
Default Countif with criteria

=SUMPRODUCT((A1:A8=1)*(B1:B8=1)*(B1:B8<=5))

Regards

Trevor


"BSantos" wrote in message
...
Can someone help me write this formula correctly.

I have 2 columns

A B

1 1
1 5
1 6
1 10
2 1
2 12
2 20
3 4

I want to count all the ones that have 1 in column A in the range of 1 to
5
in B Column. And so forth for each # in column A.

Thanks B.