Totty.js
Totty.js

Reputation: 15831

Excel get average of a result of index+match function, see details

So I have:

A   B   C   down here i want to get an average
            like this:
v   1   a   (*1) filter col "C" for what i have in row for col C, in this case "a", then filter col A for what I have in my row for col A, then all those rows must be counted, then sum them and then: sum/count
v   2   a
y   3   a
y   7   a
y   3   a
v   2   b
y   4   b
v   2   b
y   7   b

thanks

Upvotes: 0

Views: 1512

Answers (1)

ktharsis
ktharsis

Reputation: 3190

You want COUNTIFS and SUMIFS (check Excel help for the params)

Assuming your first row starts on A1:

=SUMIFS($B$1:$B$9,$C$1:$C$9,C1,$A$1:$A$9,A1) / COUNTIFS($C$1:$C$9,C1,$A$1:$A$9,A1)

Upvotes: 1

Related Questions