Averaging a dynamic range...Help ???

W

wraithlead

I've got basically three columns. ID, description, and numerical value
I would like to get an average of everything with identical ID an
Description, then put that average in the fourth column, but only o
the first instance of the ID and Description. The columns can be sorte
first if it's easier. I don't know how many of each there are.

example:

ID Description Value
Average
1 a 13
13
1 b 10
15
1 b 20
2 a 20
22
2 a 24
3 a 20
24
3 a 22
3 a 26
3 a 28
3 b 27
27


I've never written my own macro, and it's been forever since i eve
modified someone else's. Even just a headstart would be greatl
appreciated.

Ric
 
F

Frank Kabel

Hi
try the following array formula in cell D2 (entered with
CTRL+SHIFT+ENTER):
=IF(MATCH(1,($A$1:$A2=A2)*($B$1:B2=B2),0)=ROW(),AVERAGE(IF
(($A$2:$A$100=A2)*($B$2:$B$100=B2),$C$2:$C$100)))

and copy this down
 
Top