View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Matrix formula ? Second try (no image)

Kinda' quirky, but

=SUM(VLOOKUP({1,3,4,5,9,11,12},A2:B14,2,0))

array entered into two cells, will return the desired result to each cell.

Alan Beban

Pierre Archambault wrote:

Hi,

I need your help to solve a small formula problem.

A B C D E F G H I J K

1 0 1 3 4 5 9 11 12 = 3
2 0
3 0
4 1
5 1
6 0
7 0
8 1
9 0
10 1
11 0
12 1
13 0
14 0

I need to count in C1:I1 range, the number of times a given number appears
next to a "1" in the two

columns A1:B14

In this exemple, the answer is 3 because only the 4, 5 and 12 are associated
with a "1" in the adjacent

column.

Thanks.

Pierre Archambault