• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

AverageIFs with both vertical and horizontal criterias

cacos

Member
Hi everyone! Is anyone aware of a way of averaging while using both vertical and horizontal criterias?


For example, one criteria might be in A:A, while the next in D1:D20.


Thanks!
 
Lengthy, but this setup will work. Assuming this layout:

[pre]
Code:
Ex.	cat	dog	cat
a	3	4	10
a	2	5	7
b	7	9	5
b	3	9	7
[/pre]
Average of values from Group "a" that are in cat columns:

=SUMPRODUCT((C3:E6)*(B3:B6="a")*(C2:E2="cat"))/SUMPRODUCT(1*(((C3:E6)*(B3:B6="a")*(C2:E2="cat"))>0))


Answer: 5.5
 
Back
Top