+ Reply to Thread
Results 1 to 6 of 6

Averageifs for ranges with multiple columns

  1. #1
    Registered User
    Join Date
    10-03-2020
    Location
    Broomall, Pennsylvania
    MS-Off Ver
    Microsoft 365
    Posts
    7

    Averageifs for ranges with multiple columns

    Hello,
    Is there a way to take the average of the last 2 columns if the following criterion is met: Utility=BGE, Date is greater than or equal to 1/1/2020 and less than or equal to 1/31/2020?

    I am trying to figure out how to take the average of 2 columns of data based on different criteria. I tried to use averageifs, but found you can only use it to average 1 column of data. I then tried to use the array formula =AVERAGE(IF((B3:B95>=B3)*(B3:B95>=EOMONTH(B3,0))*A3:A95="BGE",C3:D95)), but received the same #Value error.

    I have attached the excel file below.
    Attached Files Attached Files

  2. #2
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: Averageifs for ranges with multiple columns

    G3 cell array formula
    HTML Code: 
    HTML Code: 
    Last edited by wk9128; 10-04-2020 at 06:09 AM.

  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 for ranges with multiple columns

    Hi,

    You were just missing some parentheses in your formula:

    =AVERAGE(IF((B3:B95>=B3)*(B3:B95>=EOMONTH(B3,0))*(A3:A95="BGE"),C3:D95))

    You could also use:

    =SUM(AVERAGEIFS(OFFSET(C:C,,{0,1}),B:B,">="&B3,B:B,">="&EOMONTH(B3,0),A:A,"BGE"))/2

    which has the advantage that you can reference entire columns with little detriment to performance (which you certainly can't do with an array formula!), though the disadvantage that it's volatile. I'd stick with the array formula and keep the size of the ranges passed to a minimum.

    Regards
    Click * below if this answer helped

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

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Averageifs for ranges with multiple columns

    wrong formula
    Last edited by CARACALLA; 10-03-2020 at 02:18 PM.

  5. #5
    Registered User
    Join Date
    10-03-2020
    Location
    Broomall, Pennsylvania
    MS-Off Ver
    Microsoft 365
    Posts
    7

    Re: Averageifs for ranges with multiple columns

    Thank you for your help!

  6. #6
    Registered User
    Join Date
    10-03-2020
    Location
    Broomall, Pennsylvania
    MS-Off Ver
    Microsoft 365
    Posts
    7

    Re: Averageifs for ranges with multiple columns

    Great, thank you!

+ 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 - Multiple Columns, Multiple Criteria
    By ayopyo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-14-2019, 12:17 PM
  2. [SOLVED] AverageIfs to average two ranges if match is met
    By bjnockle in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-20-2017, 04:25 AM
  3. [SOLVED] SUMIFS/AVERAGEIFS across multiple columns
    By keith740 in forum Excel General
    Replies: 30
    Last Post: 06-25-2015, 01:25 PM
  4. [SOLVED] AVERAGEIFS using multiple ranges and multiple criteria
    By LindsayS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2013, 01:49 PM
  5. AverageIfs for multiple criteria in different columns
    By HBEE in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-05-2013, 12:21 PM
  6. [SOLVED] averageifs on multiple tables/ranges
    By kpkammer in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-28-2012, 12:20 PM
  7. averageifs over several ranges
    By phstol in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2009, 01:18 PM

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