If you Have a list of account numbers and amounts, is there a way in one forumla to get the average per account?
Couldn't you just use
=SUM(B2:B10)/SUMPRODUCT((A2:A10<>"")/COUNTIF(A2:A10,A2:A10&""))
Of course. But the reason I invoke the formula with FREQUENCY is that it's a better approach to count the distinct items than the one with COUNTIF that fails with items which contais some special chars.
Hi Aladin
Couldn't you just use
=SUM(B2:B10)/SUMPRODUCT((A2:A10<>"")/COUNTIF(A2:A10,A2:A10&""))
Of course. But the reason I invoke the formula with FREQUENCY is that it's a better approach to count the distinct items than the one with COUNTIF that fails with items which contais some special chars.
Thats a good point against countif in some circumstances (I never had the idea that someone uses specialchars)
These are ? and * and ~
Are there more by your experience?
So if these could occur you have to replace in the searchitem first ~ with ~~ and then the others with ~* and ~?
TX for this eyeopener!
Excel Workbook | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | ||||||
2 | Haus | 50 | ||||
3 | Hausen | 100 | ||||
4 | Hausen | 100 | ||||
5 | Haus* | 70 | 160 | |||
6 | ||||||
7 | ||||||
8 | Haus | 50 | ||||
9 | Hausen | 100 | ||||
10 | Hausen | 100 | ||||
11 | Hausa | 70 | 106.6666667 | |||
Sheet |
Thats a good point against countif in some circumstances (I never had the idea that someone uses specialchars)
These are ? and * and ~
Are there more by your experience?
Book1 | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Average | Countif | Frequency | Comparison | ||||
2 | Haus | 50 | ||||||
3 | Hausen | 100 | ||||||
4 | Hausen | 100 | ||||||
5 | Haus* | 70 | 106.6667 | 2.25 | 2 | 3 | ||
6 | ||||||||
7 | Haus | 50 | ||||||
8 | Hausen | 100 | ||||||
9 | Hausen | 100 | ||||||
10 | Hausa | 70 | 106.6667 | 3 | 3 | 3 | ||
11 | ||||||||
12 | Haus | 50 | ||||||
13 | Hausen | 100 | ||||||
14 | Hausen | 100 | ||||||
15 | Haus~ | 70 | 106.6667 | 3 | 2 | 3 | ||
16 | ||||||||
17 | Haus | 50 | ||||||
18 | Hausen | 100 | ||||||
19 | Hausen | 100 | ||||||
20 | Hau? | 70 | 106.6667 | 2.5 | 2 | 3 | ||
21 | ||||||||
22 | ||||||||
23 | Hausen | 100 | ||||||
24 | Hausen | 100 | ||||||
25 | Haus~ | 70 | 135 | 2 | #N/A | 2 | ||
26 | ||||||||
27 | Haus | 50 | ||||||
28 | Hausen | 100 | ||||||
29 | Hausen | 100 | ||||||
30 | <=Haus | 70 | 106.6667 | 2.5 | 3 | 3 | ||
Sheet4 |