Hi. I have a problem that I could not figure out. I have these datasets read from a textfile (1 to N):

a1 b1

a2 b2

a3 b3

:

:

aN bN

I need to make this:

If 'a' have the same value, calculate the average of 'b'.

E.g: if a1 & a3 are the same value, than calculate (b1+b3)/2

or if a1=a3=a4=a10, then calculate the average of (b1+b3+b4+b10)/4

Thanks.Hope somebody out there can give me some ideas on this.

zmi