View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kerry[_2_] Kerry[_2_] is offline
external usenet poster
 
Posts: 26
Default A specific method for conditional averaging?

Hi,

I have a 3 columns of of data, such as the following:


Col A Col B Col C
..
..
..
4 0.2 3
5 0.3 4
6 0.2 5
7 0.5 6
8 0.3 4
9 0.7 8
10 0.1 9


I want to average valus from Col B but in a specific conditional way.
Col A is like a unique identity # for each row. Col C is a reference
to a different identity # to which the given row is connected to. If
you picture drawing a line by connecting the dots, Identity 6 is
connected to 5. Note that Identity 4 has two point connected to it.

Keeping w/ the connecting the dots analogy, I want to average each
line segment, where a segment is defined as a consecutive rows without
a break. In the example above, Rows 4 through 7 are one segment and
Rows 8 through 10 are another.

The problem is that segment vary greatly in # rows, and the total #
segments can reach the 1000s, which is why I need an automated method.
Any ideas?


Thanks,
K