F
fl
I have the following spreadsheet. I would like to find the median for
Column B for the associated item in A. For example, for Item 1, get
median(B1:B12); for Item 2, median(B13:B17); Item 3, median(b18:b20)
etc. Is there an example to do this using VBA? Thanks.
A B
= ====
1 1 154000
2 1 556000
3 1 195000
4 1 135000
5 1 154500
6 1 109896
7 1 172000
8 1 250000
9 1 162500
10 1 120000
11 1 100000
12 1 125000
13 2 126000
14 2 167565
15 2 125000
16 2 150000
17 2 90000
18 3 128648
19 3 148740
20 3 125000
21 4 104280
22 4 71500
23 4 109555
24 4 121000
25 4 132720
26 4 114600
27 4 84150
Column B for the associated item in A. For example, for Item 1, get
median(B1:B12); for Item 2, median(B13:B17); Item 3, median(b18:b20)
etc. Is there an example to do this using VBA? Thanks.
A B
= ====
1 1 154000
2 1 556000
3 1 195000
4 1 135000
5 1 154500
6 1 109896
7 1 172000
8 1 250000
9 1 162500
10 1 120000
11 1 100000
12 1 125000
13 2 126000
14 2 167565
15 2 125000
16 2 150000
17 2 90000
18 3 128648
19 3 148740
20 3 125000
21 4 104280
22 4 71500
23 4 109555
24 4 121000
25 4 132720
26 4 114600
27 4 84150