View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default how can the necessary information be extracted?

Try something like this:

With
A1:B14 containing your posted list

AND
D1: D7 containing this series: 23, 24, 25, 26, 27, 28, 29

Then....put this ARRAY FORMULA in
E1:
=IF(COUNTIF($A$1:$A$14,D1),INDEX($B$1:$B$14,MATCH( MAX(FREQUENCY(IF($A$1:$A$14=D1,$A$1:$A$14+($B$1:$B $14*0.1)),$A$1:$A$14+($B$1:$B$14*0.1))),FREQUENCY( IF($A$1:$A$14=D1,$A$1:$A$14+($B$1:$B$14*0.1)),$A$1 :$A$14+($B$1:$B$14*0.1)),0)),0)

Copy E1 into E2 and down through E7

Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Herbert Chan" wrote:

Hello,

I have some arrays like below:

29 5
26 4
24 4
23 3
24 3
25 5
24 3
23 3
24 3
27 4
27 5
25 2
27 4
26 1

For the above set, the most frequently appearing number for 24 is 3, the
most frequently appearing number for 27 is 4, and so forth. i.e., I want to
extract the most frequently appearing number for each number in the first
column.

This is what I want to get:

23 3
24 3
25 2
26 1
27 4
28 0
29 5

Thanks in advance.

Herbert