+ Reply to Thread
Results 1 to 4 of 4

sum and average if one criteria in any of 3 columns

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    36

    sum and average if one criteria in any of 3 columns

    Hi Everyone,

    I'm looking for some help on a sumifs and averageifs formula
    I want to sum cells in column A if any of the columns Q, R, or S equal "Private Payer" (and other criterias)

    I've tried using this formula, but it returns a Value error

    =SUMIFS(A2:A2000,Q2:S2000,"Private Payer",Z2:Z2000,"2013")

    also

    =Averageifs(A2:A2000,Q2:S2000,"Private Payer",Z2:Z2000,"2013")

    How would I fix this?


    Thanks!

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: sum and average if one criteria in any of 3 columns

    Try something like:
    =SUM(IF(ISNUMBER(SEARCH("Private Payer",Q2:Q2000&"x"&R2:R2000&"x"&S2:S2000)),A2:A2000,0)*IF(Z2:Z2000=2013,1,0))
    as an array formula (confirm with ctrl+shift+enter)
    you may need to play around with 2013 depending on the format of your data.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: sum and average if one criteria in any of 3 columns

    both SUMIFS and AVERAGEIFS need all ranges to be the same size so you can't use some ranges that are a single column and another that's three columns

    Is it possible to have "Private Payer" more than once on a single row? If not then try this for a sum

    =SUMPRODUCT((A2:A2000*(Q2:S2000="Private Payer")*(Z2:Z2000=2013))

    and for the average this array formula

    =AVERAGE(IF(Q2:S2000="Private Payer",IF(Z2:Z2000=2013,A2:A2000)))

    confirmed with CTRL+SHIFT+ENTER

    both of those formulas will double or treble count if you have "Private Payer" more than once in a single row
    Audere est facere

  4. #4
    Registered User
    Join Date
    01-23-2014
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: sum and average if one criteria in any of 3 columns

    Thank you! that worked perfectly,

+ 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 of two columns by criteria
    By te31 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-15-2013, 06:12 PM
  2. Average GP from multiple columns with criteria
    By t+ccyco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-30-2013, 07:06 PM
  3. [SOLVED] Average if criteria in 2 columns is met.
    By ea223 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-18-2012, 01:00 AM
  4. [SOLVED] Average Based on Criteria in Multiple Columns
    By sinspawn56 in forum Excel General
    Replies: 2
    Last Post: 07-31-2012, 01:27 PM
  5. Rolling average across columns with criteria
    By Lee1800 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-07-2008, 10:48 AM

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