title: Excel : count occurences found in another range matching criteria
body: <p>I'm pretty sure a combinaison of COUNTIFS, SUMPRODUCT, VLOOKUP, INDEX or MATCH would do the trick, but really I can't get in Excel logic and not able to do it. The closest matches I found are <a href="https://stackoverflow.com/questions/55261929/excel-counting-no-of-items-in-a-different-sheet-between-a-certain-range-matchi">this</a> and <a href="https://stackoverflow.com/questions/51643581/how-to-count-from-an-looked-up-range-in-excel">this</a>, but I was not able to transpose it. Help much appreciated.</p>
  
  <p>Here is a sample of problem with expected output in yellow.
  So for instance, E2 is the number of value greater than 1 we found in range B2:B7 for which product is equal to A.</p>
  
  <p><a href="https://i.stack.imgur.com/EJS8Z.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EJS8Z.jpg" alt="enter image description here"></a></p>
  
  <p>Sorry F3 is wrong, it should be 2 (we have 2 value of B product greater than 2)</p>