View Single Post
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

List the unique numbers from column A in another column. If there are a lot
of them you can use an advanced filter to do this for you.

Assume that unique list is in the range E1:E4.

In F1 enter this formula and copy down:

=SUMIF(A$1:A$8,E1,B$1:B$8)/COUNTIF(A$1:A$8,E1)

An alternative:

Array entered in F1 and copied down:

=AVERAGE(IF(A$1:A$8=E1,B$1:B$8))

Biff

"amerkarim" wrote in message
...

Hi Guys,

This is probably really easy but I have been struggling to average the
values in 2 linked collumns.

eg

A B
2 3
2 4
2 3
3 2
3 2
4 1
5 2
5 3

What I want to happen is it to calculate the average of the values in
the second column that match the same variable in the first column, and
paste them into a seperate row, so the formula would calculate
A B
2 (Average(3+4+3))
3 (Average(2+2))
4 1
5 (Average(2+3))

to produce these columns

A B
2 3.33
3 2
4 1
5 2.5

I have been trying to write a macro but with no luck.

Please help.

Many thanks in advance for looking.

Amer Karim


--
amerkarim