Let's assume that A2:C65000 contains the data:
Code:
1) Let E2 contain 2011, and F2 contain Mail, then try...
H2, confirmed with CONTROL+SHIFT+ENTER:
=SUM(IF(FREQUENCY(IF(A2:A65000=E2,IF(C2:C65000=F2,IF(LEN(B2:B65000)>0,MATCH(B2:B65000,B2:B65000,0)))),ROW(B2:B65000)-ROW(B2)+1)>0,1))
Code:
2) Let E3 contain 2011, F3 contain Online, and G3 contain Mail, then try...
H3, confirmed with CONTROL+SHIFT+ENTER:
=SUM(IF(FREQUENCY(IF(A2:A65000=E3,IF(ISNUMBER(MATCH(C2:C65000,F3:G3,0)),IF(LEN(B2:B65000)>0,MATCH(B2:B65000,B2:B65000,0)))),ROW(B2:B65000)-ROW(B2)+1)>0,1))
Code:
3) Let F4 contain Store, then try...
H4, confirmed with CONTROL+SHIFT+ENTER:
=SUM(IF(FREQUENCY(IF(C2:C65000=F4,IF(LEN(B2:B65000)>0,MATCH(B2:B65000,B2:B65000,0))),ROW(B2:B65000)-ROW(B2)+1)>0,1))
Code:
4) Let F5 contain Online, and G5 contain Mail, then try...
H5, confirmed with CONTROL+SHIFT+ENTER:
=SUM(IF(FREQUENCY(IF(ISNUMBER(MATCH(C2:C65000,F5:G5,0)),IF(LEN(B2:B65000)>0,MATCH(B2:B65000,B2:B65000,0))),ROW(B2:B65000)-ROW(B2)+1)>0,1))
The results should be as follows (starting at A2) ...
[TABLE="width: 512"]
<tbody>[TR]
[TD="class: xl63, width: 64, align: right"]2011[/TD]
[TD="class: xl63, width: 64"]CA1[/TD]
[TD="class: xl63, width: 64"]Mail[/TD]
[TD="class: xl63, width: 64"][/TD]
[TD="class: xl63, width: 64, align: right"]2011[/TD]
[TD="class: xl63, width: 64"]Mail[/TD]
[TD="class: xl63, width: 64"][/TD]
[TD="class: xl63, width: 64, align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA1[/TD]
[TD="class: xl63"]Store[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]Online[/TD]
[TD="class: xl63"]Mail[/TD]
[TD="class: xl63, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA1[/TD]
[TD="class: xl63"]Online[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]Store[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA1[/TD]
[TD="class: xl63"]Mail[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]Online[/TD]
[TD="class: xl63"]Mail[/TD]
[TD="class: xl63, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA1[/TD]
[TD="class: xl63"]Store[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA3[/TD]
[TD="class: xl63"]Store[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA3[/TD]
[TD="class: xl63"]Online[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA4[/TD]
[TD="class: xl63"]Store[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA2[/TD]
[TD="class: xl63"]Online[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2011[/TD]
[TD="class: xl63"]CA2[/TD]
[TD="class: xl63"]Mail[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2012[/TD]
[TD="class: xl63"]CA2[/TD]
[TD="class: xl63"]Mail[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2012[/TD]
[TD="class: xl63"]CA2[/TD]
[TD="class: xl63"]Online[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2012[/TD]
[TD="class: xl63"]CA3[/TD]
[TD="class: xl63"]Online[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2012[/TD]
[TD="class: xl63"]CA1[/TD]
[TD="class: xl63"]Online[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2012[/TD]
[TD="class: xl63"]CA1[/TD]
[TD="class: xl63"]Mail[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2012[/TD]
[TD="class: xl63"]CA3[/TD]
[TD="class: xl63"]Store[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
</tbody>[/TABLE]
Hope this helps!