title: Count unique combination of the concatenation of two columns
body: <p>I have two columns, they are adjacent, and I need to get a unique count of the resulting values from concatenating the two columns and need to relate them by the value of column A. For example:</p>
  
  <pre><code>ColA ColB
  A    X
  A    X
  B    Y
  B    Y
  B    Z
  C    X
  C    Y
  C    Z
  </code></pre>
  
  <p>Count for A: 1<br/>
  Count for B: 2<br/>
  Count for C: 3<br/></p>
  
  <p>I would like to relate them via Named lists, either one list containing both columns or two named lists of one column each. I would prefer not to use an array function, I would like this count function as a summation value. I am fine using vba and custom functions. The columns will not have blank values and always have data, I do not believe I will need error checking.</p>
  
  <p><b>Edit</b><br/>
  I can get a count of distinct permutations in the NamedList that contains ColA &amp; ColB. What I can't do is generate an IF statement that tests if NamedList:ColA == 'A'. I only have 3 distinct values for ColA and am fine with generating 3 different functions that test for A, B &amp; C separately. The below gives a count of the distinct permutations of the NamedList show above, which equals 6.</p>
  
  <pre><code>=SUMPRODUCT((NamedList&lt;&gt;"")/COUNTIF(NamedList,NamedList&amp;""))
  </code></pre>