Thanks for the speedy reply. I want to count the instances in B where criterion of A is met, not the sum of the numbers in the rows.