Hello,
I am stuck and can't figure out how to obtain the max and average using the Value column for a large dataset (300K+) using what I think is two criteria (Date, Type) I want to get the average and max for each type based on the unique dates. The type of data repeats, e.i, A, B, C, but it corresponds to different dates. I want each date to have its own average and max based on the data type. Below you can see what I mean.
I tried the following for the average, IF(A2=A1,"",AVERAGEIF($A$2:$A$73,A2,$E$2:$E$73)), but It gives me the average for everything that has the same date, so I know it's wrong. The code below shows what I need using average and max.
I am stuck and can't figure out how to obtain the max and average using the Value column for a large dataset (300K+) using what I think is two criteria (Date, Type) I want to get the average and max for each type based on the unique dates. The type of data repeats, e.i, A, B, C, but it corresponds to different dates. I want each date to have its own average and max based on the data type. Below you can see what I mean.
I tried the following for the average, IF(A2=A1,"",AVERAGEIF($A$2:$A$73,A2,$E$2:$E$73)), but It gives me the average for everything that has the same date, so I know it's wrong. The code below shows what I need using average and max.
Book2.xlsx | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Date | Type | Average | Max | Value | ||
2 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.44 | ||
3 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.44 | ||
4 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.45 | ||
5 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.66 | ||
6 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.44 | ||
7 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.45 | ||
8 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.64 | ||
9 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.47 | ||
10 | 2019-01-01 | A | 2.496666667 | 2.66 | 2.48 | ||
11 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.01 | ||
12 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.01 | ||
13 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.02 | ||
14 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.23 | ||
15 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.01 | ||
16 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.02 | ||
17 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.01 | ||
18 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.01 | ||
19 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.02 | ||
20 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.23 | ||
21 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.01 | ||
22 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.02 | ||
23 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.21 | ||
24 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.04 | ||
25 | 2019-01-01 | B | 0.065333333 | 0.23 | 0.05 | ||
26 | 2019-01-01 | C | 0.21 | ||||
27 | 2019-01-01 | C | 0.04 | ||||
28 | 2019-01-01 | C | 0.05 | ||||
29 | 2019-01-02 | A | 0.04 | 0.23 | 3.36 | ||
30 | 2019-01-02 | A | 0.04 | 0.23 | 3.36 | ||
31 | 2019-01-02 | A | 0.04 | 0.23 | 3.36 | ||
32 | 2019-01-02 | A | 0.04 | 0.23 | 3.5 | ||
33 | 2019-01-02 | A | 0.04 | 0.23 | 3.35 | ||
34 | 2019-01-02 | A | 0.04 | 0.23 | 3.36 | ||
35 | 2019-01-02 | A | 0.04 | 0.23 | 3.53 | ||
36 | 2019-01-02 | A | 0.04 | 0.23 | 3.35 | ||
37 | 2019-01-02 | B | 0.18 | ||||
38 | 2019-01-02 | B | 0.05 | ||||
39 | 2019-01-02 | B | 0.04 | ||||
40 | 2019-01-02 | B | 0.05 | ||||
41 | 2019-01-02 | B | 0.04 | ||||
42 | 2019-01-02 | B | 0.04 | ||||
43 | 2019-01-02 | B | 0.05 | ||||
44 | 2019-01-02 | B | 5.7 | ||||
45 | 2019-01-02 | C | 0.18 | ||||
46 | 2019-01-02 | C | 0.05 | ||||
47 | 2019-01-02 | C | 0.04 | ||||
48 | 2019-01-02 | C | 0.05 | ||||
49 | 2019-01-02 | C | 0.04 | ||||
50 | 2019-01-02 | C | 0.04 | ||||
51 | 2019-01-02 | C | 0.05 | ||||
52 | 2019-01-02 | C | 5.7 | ||||
53 | 2019-01-03 | A | 3.36 | ||||
54 | 2019-01-03 | A | 3.35 | ||||
55 | 2019-01-03 | A | 5.65 | ||||
56 | 2019-01-03 | A | 5.66 | ||||
57 | 2019-01-03 | A | 5.68 | ||||
58 | 2019-01-03 | A | 5.68 | ||||
59 | 2019-01-03 | A | 5.69 | ||||
60 | 2019-01-03 | A | 3.94 | ||||
61 | 2019-01-03 | A | 2.95 | ||||
62 | 2019-01-03 | A | 0.02 | ||||
63 | 2019-01-03 | A | 0.02 | ||||
64 | 2019-01-03 | B | 3.94 | ||||
65 | 2019-01-03 | B | 2.95 | ||||
66 | 2019-01-03 | B | 0.02 | ||||
67 | 2019-01-03 | B | 0.02 | ||||
68 | 2019-01-03 | B | 0.02 | ||||
69 | 2019-01-03 | B | 0.02 | ||||
70 | 2019-01-03 | B | 3.36 | ||||
71 | 2019-01-03 | C | 0.02 | ||||
72 | 2019-01-03 | C | 0.02 | ||||
73 | 2019-01-03 | C | 3.36 | ||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C2:C10 | C2 | =AVERAGE($E$2:$E$10) |
D2:D10 | D2 | =MAX($E$2:$E$10) |
C11:C25 | C11 | =AVEDEV($E$11:$E$25) |
D11:D25 | D11 | =MAX($E$11:$E$25) |
C29:C36 | C29 | =AVERAGE($E$11:$E$18) |
D29:D36 | D29 | =MAX($E$11:$E$18) |