+ Reply to Thread
Results 1 to 5 of 5

Formula for Averaging Array Given Multiple Criteria

  1. #1
    Registered User
    Join Date
    10-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    16

    Formula for Averaging Array Given Multiple Criteria

    Hi -

    I am looking for a formula that averages the numbers in an array if they match the row and column text-based criteria. Based on another thread, I found and edited the following formula. However, it is giving me incorrect numbers.

    [=AVERAGE(IF(($A$3:$A$275=$P6)*($B$2:$M$2=Q$4),$B$3:$M$275))]

    I have attached a sample workbook that includes the broken formula. Please let me know if you have any thoughts. All help is greatly appreciated.
    Attached Files Attached Files

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

    Re: Formula for Averaging Array Given Multiple Criteria

    Hi,

    =AVERAGE(IF($A$3:$A$275=$P5,IF($B$2:$M$2=Q$4,IF($B$3:$M$275<>"",$B$3:$M$275))))

    (I prefer this syntax to the product version.)

    Regards
    Click * below if this answer helped

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

  3. #3
    Registered User
    Join Date
    10-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Formula for Averaging Array Given Multiple Criteria

    That seems to work perfectly with two criteria. However, it produces the wrong value when I add a third criteria. Any thoughts?

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

    Re: Formula for Averaging Array Given Multiple Criteria

    I wouldn't be sure until I'd seen your attempt at adding that third criterion.

    Regards

  5. #5
    Registered User
    Join Date
    10-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Formula for Averaging Array Given Multiple Criteria

    Hi XOR - thanks for your help.

    This is the 3 criteria modification. (I am using the original, not test file. Let me know if this is an issue).

    =AVERAGE(IF(AllData!$D$4:$D$298=Status!$B4, IF(AllData!$A$4:$A$298=Status!$A$3, IF(AllData!$G$1:$CB$1=Status!C$3, IF(AllData!$H$4:$CC$298<>"",AllData!$H$4:$CC$298)))))

    Thanks!

+ 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. [SOLVED] Array Formula for multiple criteria
    By nickmessick1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2013, 11:23 AM
  2. [SOLVED] INDEX Array Formula with multiple criteria? possible?
    By a.mack123 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 08-09-2012, 12:25 PM
  3. [SOLVED] Excel 2007 : Multiple criteria without using an array formula
    By picasso194 in forum Excel General
    Replies: 7
    Last Post: 05-20-2012, 12:33 PM
  4. Array Formula with multiple criteria
    By amotto11 in forum Excel General
    Replies: 2
    Last Post: 05-14-2012, 03:22 PM
  5. [SOLVED] Array Formula w/ Multiple SumIf Criteria
    By Andy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 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