+ Reply to Thread
Results 1 to 8 of 8

average of cells with multiple criteria

  1. #1
    Registered User
    Join Date
    05-07-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    6

    average of cells with multiple criteria

    Hi,

    I hope someone will be able to give me some advice about this. I tried to run this formula

    =AVERAGE(IF(((EF2:EF19998=3)*(IY2:IY19998=7)+(EG2:EG19998=3)*(IZ2:IZ19998=7)+(EH2:EH19998=3)*(JA2:JA19998=7)+(EI2:EI9998=3)*(JB2:JB19998=7)+(EJ2:EJ19998=3)*(JC2:JC19998=7)+(EK2:EK19998=3)*(JD2:JD19998=7)+(EL2:EL19998=3)*(JE2:JE19998=7)+(EM2:EM19998=3)*(JF2:JF19998=7)+(EN2:EN19998=3)*(JG2:JG19998=7)+(EO2:EO19998=3)*(JH2:JH19998=7)+(EP2:EP19998=3)*(JI2:JI19998=7)+(EQ2:EQ19998=3)*(JJ2:JJ19998=7)),Z2:Z19998))

    Basically, i want to make an average of cell values for which at least one of the 12 pairs of criteria holds. It does not work, I suppose it is because its too long. If I reduce the length to some 3-4 pairs of criteria, it works fine.

    Do you know some simpler formula that might work?

    Thanks for reply!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: average of cells with multiple criteria

    You get better help on your question if you follow the advice in the link below.

    (a SMALL excel file will do).

    http://www.excelforum.com/the-water-...-question.html
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    05-07-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: average of cells with multiple criteria

    Ok, here is simplified version what i want to do. Btw, it works because its in much smaller scale, so the question is, do you know some simpler formula that might work with much more data?
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: average of cells with multiple criteria

    Maybe this could be an option.

    But as I understand the question, none of the criteria meet the target, so why you get an result on your formula?

    I marked the formulacells with the yellow background color.


    You Always want to analyze a set of data of 2 ranges.

    Or are the ranges expand to 3 , 4 and so on?

    Don't have a solution yet, but my first thought would be a pivot table.

  5. #5
    Registered User
    Join Date
    05-07-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: average of cells with multiple criteria

    Its more like the union of those criteria pairs. So when whichever of those 12 criteria holds, the cell is used in calculation of average (but the cell must be added to the calculation only once).

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: average of cells with multiple criteria

    The formula is quite strange in that there isn't a condition for the IF statement to be either TRUE or FALSE. The IF statement is like saying =IF(4,SOME RESULT) . This doesn't work because there isn't anything to say if 4 is TRUE or FALSE.

    I don't understand at all what you mean by the "UNION OF THOSE CRITERIA PAIRS". What exactly it the "union"?
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Registered User
    Join Date
    05-07-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: average of cells with multiple criteria

    Union ∪ of two datasets is set of data that are members of at least one of it (you can call it or). So i want the formula to do this, criteria pair1 ∪ pair2 ∪ pair 3 ∪ .... => if at least one of these holds, pick the corresponding cell (BUT ONLY ONCE) and add it to the average calculation.

    You can add there some condition "if false", but it doesnt change the result of the formula anyway, because some criteria holds at least once.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: average of cells with multiple criteria

    Enter this in B3 and copy down. This will identify matches in each row and return the value from column A:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Enter this in B1 to average all the values retrieved from column A excluding 0's and error values:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Using your original references, enter in AA2 and copy down the length of the column.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The Average would then be:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 05-08-2014 at 03:24 PM.

+ 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] AVERAGE with multiple criteria
    By jrlafrance in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-15-2013, 03:02 PM
  2. Multiple Sheets Multiple Criteria Average Data
    By apauaie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2013, 01:13 PM
  3. Calculate average for multiple ranges for multiple criteria
    By cesareit in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-05-2013, 01:33 PM
  4. [SOLVED] Average Ifs - multiple Criteria
    By Hudson in forum Excel General
    Replies: 4
    Last Post: 09-28-2012, 01:55 PM
  5. Excel 2007 : Average if multiple criteria and contains
    By AFmonaco in forum Excel General
    Replies: 5
    Last Post: 02-24-2012, 12:47 AM

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