Tuesday, 19 September 2017

worksheet function - Multiple AverageIf in Excel


I have an Excel data sheet with lots and lots of rows that looks something like


C1    C2    Value
--- --- -----
A C 0.228
B D 0.234
A D 0.359
A C 0.125
...

I want to find the average of Value where C1 = A and C2 = D , what's the best way to go about doing this? I know about the AVERAGEIF and COUNTIF and SUMIF functions, but they don't seem to work with multiple conditions...



Answer



In Excel 2007 and later you can use the AVERAGEIFS function, like so:


=AVERAGEIFS(C2:C5, A2:A5, "A", B2:B5, "D")

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...