View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic[_2_] Domenic[_2_] is offline
external usenet poster
 
Posts: 265
Default Count with multiple criteria / combination

In article ,
Eán wrote:

What formula or macro can I use to get the following information?
From two columns of information I need to find out how many times a certain
combination occurs for example:
Text in colums A1:A22 and B1:B22 will be a mixture of "spade", "heart",
"club", "diamond" so I need to find out if what the combinations per row are
i.e:
A1 = heart B1 = spade
A2 = heart B2 = heart
A3 = heart A3 = spade
So:
heart / spade combination = twice
heart / heart combination = once
Help please......


Let D2 contain heart and E2 contain spade

Let D3 contain heart and E3 contain heart

Then try...

F2, copied down:

=SUMPRODUCT(--($A$1:$A$22=D2),--($B$1:$B$22=E2))

--
Domenic
http://www.xl-central.com