+ Reply to Thread
Results 1 to 15 of 15

Averageif funtion to find average of multiple rows

  1. #1
    Registered User
    Join Date
    10-21-2021
    Location
    England
    MS-Off Ver
    365
    Posts
    7

    Averageif funtion to find average of multiple rows

    Hi,
    Hopefully, someone can help me. I am new to Excel. For example, trying to find the average of the games drawn by teams C, D, E & F. Consider there are 100 teams, and I know the names of the teams needing to find the average. However, I can not use the formula above and need to use the =AVERAGEIF formula. Is there any way to do that? Please help if you can. Thank you. The sample workshhet is below
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Averageif funtion to find average of multiple rows

    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.

  3. #3
    Registered User
    Join Date
    10-21-2021
    Location
    England
    MS-Off Ver
    365
    Posts
    7

    Re: Averageif funtion to find average of multiple rows

    Hi, I have attached the file. Hopefully this is ok.
    Attached Images Attached Images

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Averageif funtion to find average of multiple rows

    Post a small Excel sheet (not a picture)

  5. #5
    Registered User
    Join Date
    10-21-2021
    Location
    England
    MS-Off Ver
    365
    Posts
    7

    Re: Averageif funtion to find average of multiple rows

    How about now?
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Averageif funtion to find average of multiple rows

    Try this:

    =AVERAGE(AVERAGEIFS($D$2:$D$8,$A$2:$A$8,{"c","d","e","f"}))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Averageif funtion to find average of multiple rows

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new here, I will do it for you this time: https://www.mrexcel.com/board/thread...-rows.1185345/)

  8. #8
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Averageif funtion to find average of multiple rows

    Are the C D E F going to be real teams?

    Could their ever be more than 4?

    insert a column to the left and put a y next to the teams you wish to average

    =SUMIF(A2:A8,"Y",E2:E8)/COUNTIF(A2:A8,"y")

  9. #9
    Registered User
    Join Date
    10-21-2021
    Location
    England
    MS-Off Ver
    365
    Posts
    7

    Re: Averageif funtion to find average of multiple rows

    Thank you so much. I didn't have the time to read the forum rules yet as was in bit hurry. Will not do next time. Thanks again for your help.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Averageif funtion to find average of multiple rows

    Please do. The rules apply to everyone equally, regardless of how much in a hurry you are, and you ticked a box to say that you agreed with them as you joined.

    https://www.excelforum.com/forum-rul...rum-rules.html

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  11. #11
    Registered User
    Join Date
    10-21-2021
    Location
    England
    MS-Off Ver
    365
    Posts
    7

    Re: Averageif funtion to find average of multiple rows

    Quote Originally Posted by AliGW View Post
    Try this:

    =AVERAGE(AVERAGEIFS($D$2:$D$8,$A$2:$A$8,{"c","d","e","f"}))
    That solved it. Thanks again.

  12. #12
    Registered User
    Join Date
    10-21-2021
    Location
    England
    MS-Off Ver
    365
    Posts
    7

    Re: Averageif funtion to find average of multiple rows

    Quote Originally Posted by davsth View Post
    Are the C D E F going to be real teams?

    Could their ever be more than 4?

    insert a column to the left and put a y next to the teams you wish to average

    =SUMIF(A2:A8,"Y",E2:E8)/COUNTIF(A2:A8,"y")
    Hi, Thank you very much

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Averageif funtion to find average of multiple rows

    See post #10 with signing off instructions.

  14. #14
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Averageif funtion to find average of multiple rows

    J2=AVERAGE(FILTER(INDEX(B2:D8,,MATCH(I1,B1:D1,0)),(ISNUMBER(MATCH(A2:A8,I2:I10,0)))))

    In I1 Type win or loss,or draw


    in i2:i10 type a Team c d e f or a different sequence
    Attached Files Attached Files
    Last edited by CARACALLA; 10-21-2021 at 10:21 AM.

  15. #15
    Registered User
    Join Date
    10-21-2021
    Location
    England
    MS-Off Ver
    365
    Posts
    7

    Re: Averageif funtion to find average of multiple rows

    Quote Originally Posted by CARACALLA View Post
    J2=AVERAGE(FILTER(INDEX(B2:D8,,MATCH(I1,B1:D1,0)),(ISNUMBER(MATCH(A2:A8,I2:I10,0)))))

    In I1 Type win or loss,or draw


    in i2:i10 type a Team c d e f or a different sequence
    Hi, Thank you very much for your help.

+ 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. Translate Average Function into Sum Funtion, VBA
    By travelkid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2019, 08:42 AM
  2. averageif + average
    By jasmin-oe in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-15-2017, 03:19 AM
  3. Getting an average across columns with AverageIf
    By anthony1312002 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-31-2017, 08:53 AM
  4. [SOLVED] Averageif, but only average last X # of values
    By smatchymo in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-02-2016, 05:19 PM
  5. [SOLVED] How to use AVERAGEIF to include multiple rows of data
    By fbrb99 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-29-2015, 09:31 AM
  6. Averageif funtion paramenters in VBA
    By RD8234 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-01-2010, 05:47 AM
  7. Another Average or AverageIf Issue
    By scarames in forum Excel General
    Replies: 6
    Last Post: 08-18-2009, 11:09 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