I tried using filter function inside countif but I keep getting error in formula. If I do the filter separate it returns the correct array and I can use the countif on the spilled array using the # syntax, but if I put the filter inside the countif it doesn't work. Any suggestions? Here's the forrmula ......countif(FILTER($M$58:$N$78,L58:L78=$R57,0),Q58)