+ Reply to Thread
Results 1 to 3 of 3

AVERAGEIFS and range for criteria?

  1. #1
    Registered User
    Join Date
    12-04-2014
    Location
    Colorado, USA
    MS-Off Ver
    2010, 2013
    Posts
    7

    AVERAGEIFS and range for criteria?

    Hi,

    I have a very nice AVERAGEIFS statement that has saved me a ton of work getting me averages that match 2 separate criteria. However, I have reached a point where I need to add another criteria that is from a range as opposed to a single cell, and I can't figure out how to get it to work. My AVERAGEIFS statement looks something like this:

    =AVERAGEIFS(target range, criteria A range, cell A, criteria B range, cell B, criteria C range, cells C1:C# )

    This will only return the values from target range that matches A, B and C1, but I need it to include C2, C3, etc.

    Looking elsewhere on the forums I came across something that said that AVERAGEIFS cannot hand ORs in the criteria, which leads me to believe that ranges may not work either. If an AVERAGEIFS statement can't do this, what can I use, preferably that doesn't require adding more data to my messy columns?

    Thanks

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: AVERAGEIFS and range for criteria?

    Could you post some sample data in a workbook and show your expected results?

    BSB

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: AVERAGEIFS and range for criteria?

    Hi.

    It's probably best to switch to an array formula** in these circumstances, for example:

    =AVERAGE(IF(criteria A range=cell A,IF(criteria B range=cell B,IF(ISNUMBER(MATCH(criteria C range,cells C,0)),target range))))

    You can also use, if cells C is a range comprising a single row:

    =AVERAGE(IF(criteria A range=cell A,IF(criteria B range=cell B,IF(criteria C range=cells C,target range))))

    And if it is one comprising a single column:

    =AVERAGE(IF(criteria A range=cell A,IF(criteria B range=cell B,IF(criteria C range=TRANSPOSE(cells C),target range))))

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

+ 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. AVERAGEIFS with multiple criteria on one range
    By ctsmith84 in forum Excel General
    Replies: 7
    Last Post: 04-23-2020, 11:31 PM
  2. [SOLVED] Macro for AverageIFS, with multiple criteria in the same criteria range
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 05-24-2014, 01:13 AM
  3. [SOLVED] Several formulas with specific range criteria (AVERAGEIFS, STDEV(IF), COUNTIFS)
    By thaphthia in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 04-11-2013, 05:22 PM
  4. AVERAGEIFS with no criteria
    By anteagles20 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-14-2013, 10:10 AM
  5. Averageifs with OR criteria
    By Subject_Name_Here in forum Excel General
    Replies: 5
    Last Post: 05-28-2012, 01:57 PM

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