Count occurrences of values in a specific range (Excel) (no VBA)
<p>I need to count all of the occurrences of a given value from a specific range of cells (containing strings or numbers), depending on a parameter stored in another cell.</p>

<p>I prepared a simple Excel table as an example (see attached image): let's say I want to count all of the occurrences of the VALUE "4" for the BASE "100". The result should be: 2 (C4 + C5).</p>

<p><a href="http://i.stack.imgur.com/gJmpC.jpg" rel="nofollow">Attached image</a></p>

<p>I tried to use COUNTIFS and FIND functions but with no results. The former only considers exact values (so the 4 in cell C5 will be ignored) while I seem to be unable to add another condition - the BASE column - to the latter.</p>

<p>Fact is I need to solve this with formulas only, no programming. </p>

<p>Thanks in advance for your help!</p>