+ Reply to Thread
Results 1 to 5 of 5

Finding average with one criteria or another.

  1. #1
    Registered User
    Join Date
    12-11-2011
    Location
    Penticton, BC
    MS-Off Ver
    Excel 2010
    Posts
    9

    Finding average with one criteria or another.

    I am trying to calculate an average in column E, which will only include numbers that meet one of 2 criteria in column C (either "yes" or "still considering"). Having one criteria is easy, but for some reason I am hung up on adding the second criteria. If I use AverageIFS, it doesn't work because I want it to include the number if it has one or the other, but not have both "yes" or "still considering". I could also use the DAverage as I have a section with the headings "yes" or "still considering", but I am stumped again in coming up with the right formula. Any help is appreciated!!

    Thanks.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,427

    Re: Finding average with one criteria or another.

    AVERAGE is made up of the SUM of the cells which match the criteria divided by the count of those cells, so you can use SUMIF and COUNTIF, like this:

    =(SUMIF(C:C,"yes",A:A)+SUMIF(C:C,"still considering",A:A))/(COUNTIF(C:C,"yes")+COUNTIF(C:C,"still considering"))

    I've assumed that the values to be summed are in column A.

    Hope this helps.

    Pete

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Finding average with one criteria or another.

    You can use tHis Array formula(CSE)

    =AVERAGE(IF(A1:A100="yes",A1:A100="still considering",B1:B100))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    12-11-2011
    Location
    Penticton, BC
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Finding average with one criteria or another.

    thank you for the help! Pete_UK your formula definitely works so thank you.

    Fotis1991, your formula seems very clean and I like it, but I am getting a value error. Is there anything you can see that is slightly out or something?

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Finding average with one criteria or another.

    Hi

    Probably you did not use Control+Shift+Enter(Array formula) to confirm. Not just Enter.

    But i do not understand how happened...,but this was not correct formila.

    This is it(Also, Array formula).

    =AVERAGE(IF((A1:A100="still considering")+(A1:A100="yes"),B1:B100))
    Attached Files Attached Files

+ 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