Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

problems with averageifs formula

Posted on 2015-02-04
8
Medium Priority
?
90 Views
Last Modified: 2015-02-11
hi Folks
I've created an averagesifs function but it keeps coming up with Div/o. I've attached an example. It's on the Readiness to train sheet. Essentially I want the formula to match the person and the week number on the list (that bit works fine) and then for each of the categories add up the score for each heading e.g. Mood/motivation etc. The numbers are formatted as general. But I can't see why it's not giving me an average score based on that person, week number and each of the symptoms..thanks as always.
EE-monitoring-average-if-formula.xlsx
0
Comment
Question by:agwalsh
[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 33

Assisted Solution

by:Rob Henson
Rob Henson earned 2000 total points
ID: 40588432
You have two criteria referring to the Symptons sheet.

All of the Criteria within the IFS functions are dealt with as AND operators, so the result of the criteria for "Mood/Motivation" AND "Energy Levels" is zero.

I suspect you can use a SUMPRODUCT instead but wouldn't like to say for definite.

Alternative would be to use a combination of SUMIFS and COUNTIFS:

Without going into the full formula, it would be along the lines of:

=(SUMIFS(Criteria1)+SUMIFS(Criteria2)) / (COUNTIFS(Criteria1)+COUNTIFS(Criteria2))

The result for your Conor example would be:
SUMIFS
Mood - (4 + 1) = 5
Energy - (3 + 2) = 5
Total 10

 COUNTIFS
Mood - 2
Energy - 2
Total 4

SUMIFS / COUNTIFS = 2.5

Thanks
Rob H
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 2000 total points
ID: 40588442
Full formula was easy enough to replicate in the end:

=(SUMIFS(Table1[Score],Table1[Name],$A2,Table1[Week number],B$1,Table1[Symptoms],Sheet6!$A$1)+SUMIFS(Table1[Score],Table1[Name],$A2,Table1[Week number],B$1,Table1[Symptoms],Sheet6!$A$2))/(COUNTIFS(Table1[Name],$A2,Table1[Week number],B$1,Table1[Symptoms],Sheet6!$A$1)+COUNTIFS(Table1[Name],$A2,Table1[Week number],B$1,Table1[Symptoms],Sheet6!$A$2))

Note: SUMIFS has SUM range as first parameter; COUNTIFS has no such parameter, just criteria.

Thanks
Rob H
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40588452
You could also array enter:

=SUM(SUMIFS(Table1[Score],Table1[Name],'Readiness to train data'!$A2,Table1[Week number],'Readiness to train data'!B$1,Table1[Symptoms],Sheet6!$A$1:$A$2))/SUM(COUNTIFS(Table1[Name],'Readiness to train data'!$A2,Table1[Week number],'Readiness to train data'!B$1,Table1[Symptoms],Sheet6!$A$1:$A$2))
0
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.

 

Author Comment

by:agwalsh
ID: 40588647
hm, just wondering why the averageifs didn't work though...but I might just try the averageifs and array enter it....and see if that works..
0
 

Author Comment

by:agwalsh
ID: 40588700
Yep, people that worked (player data) ..although what I want to do now is add a formula that will do that calculation but only for the week number and player specified in the Readiness to train sheet. Thanks :-)
monitoring-average-if-formula-vers-02.xl
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40588859
Do you not want the Symptoms part of it then?

Without the symptoms part, your original formula would have worked as the issue was down to trying to use two symptoms.

Thanks
Rob H
0
 
LVL 33

Accepted Solution

by:
Rob Henson earned 2000 total points
ID: 40588874
hm, just wondering why the averageifs didn't work though

I told you that....because it had two criteria for symptoms and was trying to find rows that matched symptom 1 AND symptom 2, rather than symptom 1 OR symptom 2

The array entered suggestion from Rory included the Range A1:A2 of symptoms in one criteria rather than each in its own criteria.

Thanks
Rob H
0
 

Author Closing Comment

by:agwalsh
ID: 40602564
Worked beautifully in the end. Can see alot of scope for how this would work...and gave me additional insight into the SumIFS/CountifS function. Thanks as always...
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

715 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