View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Averaging a dynamic range...Help ???

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(),AV ERAGE(IF
(($A$2:$A$100=A2)*($B$2:$B$100=B2),$C$2:$C$100)))

and copy this down

-----Original Message-----
I've got basically three columns. ID, description, and

numerical value.
I would like to get an average of everything with

identical ID and
Description, then put that average in the fourth column,

but only of
the first instance of the ID and Description. The columns

can be sorted
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 even
modified someone else's. Even just a headstart would be

greatly
appreciated.

Rich


---
Message posted from http://www.ExcelForum.com/

.