+ Reply to Thread
Results 1 to 4 of 4

Averageif across multiple columns

Hybrid View

  1. #1
    Registered User
    Join Date
    08-18-2017
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    2

    Averageif across multiple columns

    I have the months of the year listed in columns. Under each month I have a reported lab value. I would like to average the lab values over the months, however, I only want to average them if the value in column cell A is equal to "Y". The formula will only show the value listed in the first month and will not average across the months. If I do a simple average across the months it averages fine, but not using AVERAGEIF function. Is this a limitation of the function across columns? The formula I am using is: =IFERROR(AVERAGEIF(A2, "Y", B2:M2), ""). The "IF" part seems to be working, just won't average.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Averageif across multiple columns

    Hi, welcome to the forum

    if all you are doing, is testing to see if A contains Y, then why not just...
    =IF(A2="y",AVERAGE(B2:M2),"")

    The way you are doing it, it is ONLY looking ar B2 for the avg
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: Averageif across multiple columns

    Try

    N2
    Formula: copy to clipboard
    =IF(A2="Y",AVERAGE(B2:M2),"")
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  4. #4
    Registered User
    Join Date
    08-18-2017
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    2

    Re: Averageif across multiple columns

    Thank you so much! That works perfectly. Self learning is painful! I spent hours trying to figure this out. This makes more sense.

+ 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. AVERAGEIF - single criterion in multiple columns?
    By oyvindh in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-16-2016, 11:10 AM
  2. Use of Averageif on Multiple Columns
    By matubis.jp in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-13-2015, 05:19 PM
  3. [SOLVED] AVERAGEIF Multiple Columns
    By Markvx in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-29-2015, 08:48 AM
  4. [SOLVED] AVERAGEIF with multiple columns average_range
    By Shurov in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-11-2014, 09:51 AM
  5. [SOLVED] AverageIF using multiple criteria in different columns in multiple worksheets
    By trubertiam in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-03-2014, 09:28 PM
  6. AVERAGEIF function for multiple columns.
    By thatguytg53 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-11-2014, 06:17 PM
  7. Averageif multiple columns
    By bronzboy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-27-2013, 03:59 PM

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