View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg
 
Posts: n/a
Default Matching multiple columns

Since you want the sheet to update
whenever the dataset expands,
you cannot use sort, copy and delete.
Dynamic named ranges will solve that,
but it ain't easy.
Assume your dataset consists of 50 rows and
has numbers from 10 to 30, partly shown he

bin0 bin2 freq
22 10 4
26 11 2
20 12 2
26 13 1
23 14 3
.... ... ...
17 27 2
29 28 2
25 29 2
10 30 2
30 #N/A 0
10 #N/A #N/A
17 #N/A #N/A
.... ... ...

Select the 3 columns, including the headers
and enough extra rows to leave room for expansion and
Insert Name Create Top Row
Also create these names:
bin1 Refers To: =INDEX(bin0,1):INDEX(bin0,COUNTA(bin0))
bin3 Refers To: =INDEX(bin2,1):INDEX(bin2,COUNT(bin2))
set1 Refers To: =ROW(INDEX($A:$A,MIN(bin1)):INDEX($A:$A,MAX(bin1)) )
Fill the bin2 column with this array formula:
=set1
Fill the freq column with this array formula:
=FREQUENCY(bin1,bin3)
or this formula:
=COUNTIF(bin1,bin3)
When you add numbers to bin0,
the other columns will update and expand automatically.