Solved

Adding 2nd criteria for AverageIf Excel Formula

Posted on 2014-01-06
2
385 Views
Last Modified: 2014-01-06
Hello experts,

I'm using AVERAGEIF function to return the average of all the cells in a range that meet a given criteria.

I need to add a 2nd condition to the formula, but the problem is that the 2nd condition is not related to the first one, and hence it cannot be combined with it.

So, what I'm looking for is actually the following:

AverageIf (Condition 1 is met, Condition 2 is met, Average_Range*)

* Average_range is the actual set of cells to average.

I'm attaching the worksheet that has the AVERAGEIF formula in the hope it will better explain what I'm trying to achieve.
AverageIf-Sample-Data.xlsx
0
Comment
Question by:Mehawitchi
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 39759362
I think you just mean:

=AVERAGEIFS(INPUT!$G$2:$G$1670,INPUT!$K$2:$K$1670,$E5,INPUT!$I$2:$I$1670,F$2)

This will return errors if there are no matching data, so you may want to add an IFERROR to return either "" or 0:

=IFERROR(AVERAGEIFS(INPUT!$G$2:$G$1670,INPUT!$K$2:$K$1670,$E5,INPUT!$I$2:$I$1670,F$2),"")
0
 

Author Closing Comment

by:Mehawitchi
ID: 39759725
Brilliant!
Thank you Rory - You're really Genius!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now