?
Solved

Average IF

Posted on 2014-10-16
8
Medium Priority
?
76 Views
Last Modified: 2014-10-16
Hi,

Im getting a #DIV/0 on the below formula

=AVERAGEIFS(WinLoss!R:R,WinLoss!BC:BC,"Yes",WinLoss!BA:BA,"Yes",WinLoss!F:F,"<>Renew",WinLoss!W:W,"Lost",WinLoss!W:W,"Cancelled")

Can anyone see why?

Thanks
0
Comment
Question by:Seamus2626
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 40384012
Hi,

have you tested what the Help says

If average_range is a blank or text value, AVERAGEIFS returns the #DIV0! error value.
If cells in average_range cannot be translated into numbers, AVERAGEIFS returns the #DIV0! error value.
If there are no cells that meet all the criteria, AVERAGEIFS returns the #DIV/0! error value.


Regards
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40384067
WinLoss!W:W,"Lost",WinLoss!W:W,"Cancelled"

Those last two can't both be true at once.
0
 

Author Comment

by:Seamus2626
ID: 40384082
They can be true, in terms of the data, we can have cancelled and lost, which is what im looking for, must the structure of the IF change?

Thanks
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 40384094
I mean one row cannot match both criteria, so you will never get any matches, hence your DIV/0 problem. You would need either SUMIFS / COUNTIFS or use an array version like:
=AVERAGE(IF((WinLoss!BC1:BC1000="Yes")*(WinLoss!BA1:BA1000="Yes")*(WinLoss!F1:F1000<>"Renew")*((WinLoss!W1:W1000="Lost")+(WinLoss!W1:W1000="Cancelled")),WinLoss!R1:R1000))
which is entered with Ctrl+Shift+Enter. Note: do NOT use entire column references with this formula!
0
 

Author Closing Comment

by:Seamus2626
ID: 40384099
I get it now!

Out of interest, why cant entire column reference be used?
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40384105
Because it will make the formula calculate really slowly.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40384108
BTW, you could also use:

=SUM(SUMIFS(WinLoss!R:R,WinLoss!BC:BC,"Yes",WinLoss!BA:BA,"Yes",WinLoss!F:F,"<>Renew",WinLoss!W:W,{"Lost","Cancelled"}))/SUM(COUNTIFS(WinLoss!BC:BC,"Yes",WinLoss!BA:BA,"Yes",WinLoss!F:F,"<>Renew",WinLoss!W:W,{"Lost","Cancelled"}))
0
 

Author Comment

by:Seamus2626
ID: 40384113
That all makes sense, thanks Rory!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

764 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