+ Reply to Thread
Results 1 to 2 of 2

Using AVERAGEIF with a range spanning multiple columns

  1. #1
    Registered User
    Join Date
    03-17-2020
    Location
    Yakima, WA
    MS-Off Ver
    Microsoft Office 365 Pro Plus
    Posts
    34

    Using AVERAGEIF with a range spanning multiple columns

    Hello,
    I have been able to successfully use AVERAGEIF to find the average of values in a column. Can I also use it to get the average of values in a table? When I try to do this, the average is not correct when I compare to manual calculation.

    I have tried this with and without naming the range, but the result still seems to be the same.

    I'll attach a document with my current work.

    - Averages Section (this is the part that I am using formulas to calculate the averages of the data entry down below). The problem area is in RED. I want to get an average of all the scores for a product, across all features/columns in B15-0213 (named range is "scores"). I have to do this periodically, so I would like to set up the formulas so they need no alteration in the future.

    - Scoring Section (this is where the scores are entered individually) I put this into a table, so that it would be easier to name the ranges, and items could be filtered.

    - Product Filter- you can use this to filter the scores for a certain product, then highlight over all the scores to see an average to verify the formulas above.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Using AVERAGEIF with a range spanning multiple columns

    The quick answer is that you could use array formulas.

    P3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Your P3 formula, =AVERAGEIF(Table13[Product],$A3,Scores), returns the same result as =AVERAGEIF(Table13[Product],$A3,INDEX(Scores,0,1)), so it appears AVERAGEIF constrains its 3rd argument to the same size as its 1st argument. FWIW, =AVERAGEIFS(Scores,Table13[Product],$A3) returns #VALUE! . This isn't how I recall it working in previous Excel versions, but I don't have any others with which to test at the moment, only Office 365.

    Usually I'd suggest SUMPRODUCT instead, but in this case you also have text N/A values in Scores, which scuppers a single SUMPRODUCT call, though you could use

    P3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    however, the array formula above is more efficient.

+ 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. Replies: 4
    Last Post: 09-02-2019, 04:14 PM
  2. [SOLVED] Averageif across multiple columns
    By Tleuthe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-19-2017, 10:52 AM
  3. Use of Averageif on Multiple Columns
    By matubis.jp in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-13-2015, 05:19 PM
  4. [SOLVED] AVERAGEIF Multiple Columns
    By Markvx in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-29-2015, 08:48 AM
  5. Averageif multiple columns
    By bronzboy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-27-2013, 03:59 PM
  6. copy one row of named range spanning non contiguous columns
    By Lucas12345678920 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2013, 09:59 PM
  7. Function spanning multiple rows and columns
    By robzima in forum Excel General
    Replies: 2
    Last Post: 06-02-2010, 10:49 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