View Single Post
  #1   Report Post  
amerkarim amerkarim is offline
Junior Member
 
Posts: 4
Default Help with averages please

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