+ Reply to Thread
Results 1 to 5 of 5

AVERAGEIFS Across Columns with different criteria

  1. #1
    Registered User
    Join Date
    06-21-2011
    Location
    Belize City, Belize
    MS-Off Ver
    Excel 2007
    Posts
    20

    AVERAGEIFS Across Columns with different criteria

    Hi

    In the attached sample spreadsheet, how do I get the average for March-11 to July-11 for all Males who have "New or Existing" status of "E". I want to disregard zeros or blank cells.

    Thanks.

    ltsolis
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: AVERAGEIFS Across Columns with different criteria

    Probably a better way to do it with AVERAGEIFS or SUMIFS but using SUMPRODUCT

    =SUMPRODUCT(--(SampleData[New or Existing
    (N/E)]="E")*SampleData[[March-11]:[Jul-11]])/SUMPRODUCT(--(SampleData[New or Existing
    (N/E)]="E")*(SampleData[[March-11]:[Jul-11]]>0))
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    06-21-2011
    Location
    Belize City, Belize
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: AVERAGEIFS Across Columns with different criteria

    Thanks ChemistB

    How do I fit in the other criteria of "S**=M"?

    ltsolis

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: AVERAGEIFS Across Columns with different criteria

    Oops, missed that part

    =SUMPRODUCT(--(SampleData[New or Existing
    (N/E)]="E")*(SampleData[***]="M")*SampleData[[March-11]:[Jul-11]])/SUMPRODUCT(--(SampleData[New or Existing
    (N/E)]="E")* (SampleData[***]="M")*(SampleData[[March-11]:[Jul-11]]>0))

  5. #5
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: AVERAGEIFS Across Columns with different criteria

    AVERAGEIFS(SampleData[Total],SampleData[New or Existing
    (N/E)],"E",SampleData[March-11],"<>"&"",SampleData[March-11],"<>"&0,SampleData[April-11],"<>"&"",SampleData[April-11],"<>"&0)

    this would only cover march and april, but you can add on may junes etc into the formula
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

+ 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