se non ricordo male, potresti usare la funzione COUNTIF...