+ Reply to Thread
Results 1 to 5 of 5

AVERAGEIFS - trouble with argument for criteria_2

  1. #1
    Registered User
    Join Date
    05-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    AVERAGEIFS - trouble with argument for criteria_2

    I am struggling with my formula - specifically, the argument for criteria_2. I would like to find the average of "complete", "1st dn", and "td". If any of the three are true, I would like to average the gain. I have attached my data set. Here is my formula:

    =AVERAGEIFS(H2:H96,M2:M96,"Pass",N2:N96,"complete","1st dn","td"
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: AVERAGEIFS - trouble with argument for criteria_2

    Try this...

    Use cells to hold the criteria:

    AB2 = Pass

    AC2 = Complete
    AC3 = 1st dn
    AC4 = td

    This array formula**:

    =AVERAGE(IF(M2:M96=AB2,IF(ISNUMBER(MATCH(N2:N96,AC2:AC4,0)),H2:H96)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: AVERAGEIFS - trouble with argument for criteria_2

    You won't be able to do that with AVERAGEIFS, you can use this version

    =SUM(SUMIFS(H2:H96,M2:M96,"Pass",N2:N96,{"complete","1st dn","td"}))/SUM(COUNTIFS(M2:M96,"Pass",N2:N96,{"complete","1st dn","td"}))

    or with an "array formula"

    =AVERAGE(IF(M2:M96="Pass",IF(ISNUMBER(MATCH(N2:N96,{"complete","1st dn","td"},0)),H2:H96)))

    confirmed with CTRL+SHIFT+ENTER
    Audere est facere

  4. #4
    Registered User
    Join Date
    05-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: AVERAGEIFS - trouble with argument for criteria_2

    That worked brilliantly! Thank you very much for the help. I cannot tell you how grateful I am.

    Mike

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: AVERAGEIFS - trouble with argument for criteria_2

    You're welcome. Thanks for the feedback!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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