Excel formula, COUNTIF two conditions : <p>I need a formula in Excel or VBA function, which will allow me to count the answers aggregated according to previously question. Table below will help me to explain this:</p>

<pre><code>+-----------+-------------+
|     A     |      B      |
+-----------+-------------+
| Question1 | Question2   |
| d         | a,b,c,d     |
| a         | a,b,c,d,e,f |
| a         | a,b         |
| b         | a,e         |
| c         | b,e,h,k     |
| d         | b,f         |
| d         | b,g,j       |
| b         | c,d,e       |
| a         | a,c,j       |
+-----------+-------------+
</code></pre>

<p>Question1 column will be treated as profilling question, for example company size. a - small, b - medium, c - big, d - enterprise. I need on my output to count question2 answers aggregated to company size. For example, how many small companies have ticked answer a etc. I know how to count overall percentage of each question in answers, but I need compare it to profiling Question1. I do not know how to combine COUNTIF function which addotional condition - IF column A contains "a" pass it to COUNTIF(). I am considering VBA solution too.</p>

<p>Kind Regards</p>
