+ Reply to Thread
Results 1 to 6 of 6

AverageIFS

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    84

    AverageIFS

    I'm trying to get the following formula to work. The problem seems to that Excel will not do an average on a column with two criteria conditions.

    Thanks for your help.

    =AVERAGEIFS(H:H,A:A,M36,G:G,OR("Pending","Approved"))

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: AverageIFS

    Hi there. try this:

    =AVERAGEIFS(H:H,A:A,M36,G:G,{"Pending","Approved"})
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: AverageIFS

    You need SUMIFS/COUNTIFS like this

    =SUM(SUMIFS(H:H,A:A,M36,G:G,{"Pending","Approved"}))/SUM(COUNTIFS(A:A,M36,G:G,{"Pending","Approved"}))

    ...or you can use an array formula like this.

    =AVERAGE(IF(A:A=M36,IF(G:G={"Pending","Approved"},H:H)))

    Confirmed with CTRL+SHIFT+ENTER

    ....bUt for the latter formula you should probably restrict the ranges, whole columns will be slow
    Last edited by daddylonglegs; 05-27-2015 at 12:20 PM.
    Audere est facere

  4. #4
    Registered User
    Join Date
    01-17-2013
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: AverageIFS

    The formula works pretty well. It breaks down when trying to add "Approved" from the G column as a criteria. "Pending" works for some odd reason.

    {=AVERAGEIFS($H$487:$H$489,$C$487:$C$489,"Gaming",$A$487:$A$489,{"Open-Pending Approval","Design Win-Pending Approval"},G487:G489,{"Pending","Approved"})}

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: AverageIFS

    Check for extra spaces before/after "approved" in G..

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: AverageIFS

    Quote Originally Posted by rbirch View Post
    {=AVERAGEIFS($H$487:$H$489,$C$487:$C$489,"Gaming",$A$487:$A$489,{"Open-Pending Approval","Design Win-Pending Approval"},G487:G489,{"Pending","Approved"})}
    This syntax won't work - you need to use the method I suggested - if you have an additional multiple criteria you need to use comma separators for one and semi-colons for the other - like this:

    =SUM(SUMIFS($H$487:$H$489,$C$487:$C$489,"Gaming",$A$487:$A$489,{"Open-Pending Approval","Design Win-Pending Approval"},G487:G489,{"Pending";"Approved"}))/SUM(COUNTIFS($C$487:$C$489,"Gaming",$A$487:$A$489,{"Open-Pending Approval","Design Win-Pending Approval"},G487:G489,{"Pending";"Approved"}))

    If you want to have more than two "multi-criteria" then you need to use the array formula approach I suggested

    When you use an "array constant" as a criterion in AVERAGEIFS then the result is also an array - but there's no way to get a single average from that array (you can't average it because that wouldn't take account of the number of instances for each), hence the need for SUMIFS/COUNTIFS approach
    Last edited by daddylonglegs; 05-27-2015 at 03:07 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] IF NOT IN with AVERAGEIFS
    By trizzo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2014, 04:44 PM
  2. [SOLVED] Averageifs
    By mahershams in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-23-2014, 08:40 AM
  3. [SOLVED] Averageifs?
    By thelastflame in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-10-2014, 01:09 PM
  4. Averageifs.
    By lokpal.panwar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2014, 07:09 AM
  5. [SOLVED] MIN and MAX like an AVERAGEIFS?
    By superchill435 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-10-2012, 09:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1