+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : AVERAGEIFS including several conditions

  1. #1
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    AVERAGEIFS including several conditions

    Hello, Me again!

    I am using the formula below:

    =AVERAGEIFS(AB:AB,X:X,"Kenyan Shift",Y:Y,">0",AA:AA,">0",D:D,"Yes")

    to calculate average response times for investigations. It is working fine but I need to add another condition and the formula I have tried isn't working. In addition to the formula above, I need to add to it so that it only includes cells if the value in column W = EITHER "HS1, HS2, or HS3. I know how to write the formula to include just one additional condition but I don't know how to make it look for either of these three terms.

    Is anyone able to assist, please?
    Last edited by milliemoo; 11-16-2011 at 11:37 AM.

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: AVERAGEIFS including several conditions

    I worked on it for a few minutes, then found this reply from NBVC to a similar thread a while ago:

    http://www.excelforum.com/excel-work...functions.html

    Apparently if you want to integrate in the OR function, you're looking at stepping away from the Averageifs and looking towards the fun fun Sumproduct function.

    Unfortunately, I'm still pretty terrible with sumproduct, but I know the others on the forums are good with it, and I'm sure one of them will be by shortly!

    -waits-
    Going for Guru! Click the Star to the bottom left of this post if I helped!

  3. #3
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: AVERAGEIFS including several conditions

    Thank you for your efforts! I'll see what I can do with the SUMPRODUCT function. Failing that, I'll do a table somewhere else to calculate each one individually and then another formula based on that!

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: AVERAGEIFS including several conditions

    Or you can upload example workbook...

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

    Re: AVERAGEIFS including several conditions

    you can use a SUMIFS/COUNTIFS type setup like this

    =SUM(SUMIFS(AB:AB,X:X,"Kenyan Shift",Y:Y,">0",AA:AA,">0",D:D,"Yes",W:W,{"HS1","HS2","HS3"}))/SUM(COUNTIFS(X:X,"Kenyan Shift",Y:Y,">0",AA:AA,">0",D:D,"Yes",W:W,{"HS1","HS2","HS3"}))

    ......or if HS1, HS2, and HS3 are the only possible 3 character entries beginning with HS (no HS7 or HSx possible in column W for instance) then you could go back to AVERAGEIFS - with a wildcard, i.e.

    =AVERAGEIFS(AB:AB,X:X,"Kenyan Shift",Y:Y,">0",AA:AA,">0",D:D,"Yes",W:W,"HS?")
    Audere est facere

  6. #6
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: AVERAGEIFS including several conditions

    daddylonglegs.....I knew you'd save the day! Thank you.....I'll try it now.

  7. #7
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: AVERAGEIFS including several conditions

    It works! I have used the first formula as there are other HS entires that can appear. I need to repeat this formula but for other groups of HS numbers. Thank you so much for your assistance. I hope you guys either get paid a lot of money to do this or absolutely love doing it!

+ 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