Solved

problems with averageifs formula

Posted on 2015-02-04
8
63 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
  • 4
  • 3
8 Comments
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 500 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 31

Assisted Solution

by:Rob Henson
Rob Henson earned 500 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
 

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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 31

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 31

Accepted Solution

by:
Rob Henson earned 500 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

747 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

12 Experts available now in Live!

Get 1:1 Help Now