Solved

problems with averageifs formula

Posted on 2015-02-04
8
73 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 33

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 33

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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

730 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