+ Reply to Thread
Results 1 to 5 of 5

Multi-Conditional Average

  1. #1
    Registered User
    Join Date
    01-23-2009
    Location
    Adelaide
    MS-Off Ver
    Excel 2016
    Posts
    30

    Multi-Conditional Average

    Hi All

    Please see attached example for reference - I am trying to calculate an average if it meets 2 conditions, i.e, calulate the average for the Lead Time column if it is a Bag and On Time. Hope you guys can come through as always!

    Cheers
    Paul
    Attached Files Attached Files
    Last edited by VBA Noob; 03-10-2009 at 05:08 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multi-Conditional Average

    Try:

    =AVERAGE(IF(A5:A28="Bag",IF(D5:D28="On Time",C5:C28)))

    which must be confirmed with CTRL+SHIFT+ENTER
    not just ENTER. You will see { } brackets appear around the formula.

    Note:

    In you example you have an extra space after each occurance of Bag... please delete that space to get proper results.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-23-2009
    Location
    Adelaide
    MS-Off Ver
    Excel 2016
    Posts
    30

    Re: Multi-Conditional Average

    Hi NBVC

    Thanks for the quick reply. I have added this formula, also using Ctrl+Shift+Enter but get #DIV/0!. I have added example. Would be most grateful if you could have a look.

    Cheers
    Paul
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multi-Conditional Average

    As I mentioned in the note in my previous post... you must go and delete the extra space after the word Bag in each cell of column A.

    or..

    change formula to (which is not the better way):

    =AVERAGE(IF(TRIM(A5:A28)="Bag",IF(D5:D28="On Time",C5:C28)))

  5. #5
    Registered User
    Join Date
    01-23-2009
    Location
    Adelaide
    MS-Off Ver
    Excel 2016
    Posts
    30

    Re: Multi-Conditional Average

    Ahh. Gotcha. Thanks heaps

+ 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