+ Reply to Thread
Results 1 to 10 of 10

Using Averageifs function in excel with multiple condition

Hybrid View

  1. #1
    Registered User
    Join Date
    01-28-2011
    Location
    houston
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Using Averageifs function in excel with multiple condition

    Quote Originally Posted by Ron Coderre View Post
    This regular formula averages the Col_B cells where the corresponding Col_A cell equals any of a, b, or e
    C1: =SUM(SUMIF(A:A,"="&{"a","b","e"},B:B))/SUM(COUNTIF(A:A,"="&{"a","b","e"}))
    Is that something you can work with?
    Thanks Ron,

    How to use same example for countif?

  2. #2
    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: Using Averageifs function in excel with multiple condition

    ..An example is here..
    Attached Files Attached Files
    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.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Using Averageifs function in excel with multiple condition

    Quote Originally Posted by xenos14 View Post
    Thanks Ron,

    How to use same example for countif?
    In this part of the formula I posted:
    SUM(COUNTIF(A:A,"="&{"a","b","e"}))

    This section: "="&{"a","b","e"}
    resolves to these three distinct criteria:
    ="a"
    ="b"
    ="e"
    (The braces {} define the beginning and end of the array of values)

    Consequently, this: SUM(COUNTIF(A:A,"="&{"a","b","e"}))
    is equivalent to this:
    SUM(COUNTIF(A:A,="a"),COUNTIF(A:A,="b"),COUNTIF(A:A,="e"))

    I hope that helps
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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