+ Reply to Thread
Results 1 to 12 of 12

Averageifs formula with criteria based on a different range

  1. #1
    Registered User
    Join Date
    12-09-2015
    Location
    miam, florida
    MS-Off Ver
    2013
    Posts
    6

    Averageifs formula with criteria based on a different range

    In excel I would like to get the average salary of the top 4 performing baseball players on each team. I can not for the life of me get around which criteria to make this work. I can get the average salary of the players on one team, I can even get the average salary of players with Proj > 7, just not the average of the top 4.

    Anyy suggestions to help me get over this hump?


    averagifs.PNG

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Averageifs formula with criteria based on a different range

    Many members are unable to see images in the *.png format due to forum compatibility issues with some browsers.

    If you need to post an image post it in the *.jpg format.

    Even better than posting images... post a SMALL sample file. That way we can test solutions directly in the file with the relevant data.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    12-09-2015
    Location
    miam, florida
    MS-Off Ver
    2013
    Posts
    6

    Re: Averageifs formula with criteria based on a different range

    I have attached a JPG, but I am still trying to figure out how to add the sample xls. Still new to the forums so working things out but will catch up eventually

    averagifs.jpg

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Averageifs formula with criteria based on a different range

    Try something like this.

    Array entered**:

    =AVERAGE(IF(Team="Mil",IF(Proj>=LARGE(IF(Team="Mil",Proj),4),$$)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  5. #5
    Registered User
    Join Date
    12-09-2015
    Location
    miam, florida
    MS-Off Ver
    2013
    Posts
    6

    Re: Averageifs formula with criteria based on a different range

    Thanks for the reply. I am still trying to figure out how to attach the sample xls. for some reason no files show up in the drop down even after going to manage attachments. But all that aside. Here is the current formula I am using to get average salary

    =AVERAGEIFS(HITTERPROJECTIONS[$$],HITTERPROJECTIONS[team],[@TEAM],HITTERPROJECTIONS[Proj],">7")

    This gets the average of players on a team projected to get more than 7 pts. Sometimes a team will have 7 or 8 players projected above 7pts, so I only want the top 4 players.

    I hope that adds some clarification.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Averageifs formula with criteria based on a different range

    Quote Originally Posted by sangamc View Post

    I hope that adds some clarification.
    Unfortunately, it doesn't!

  7. #7
    Registered User
    Join Date
    12-09-2015
    Location
    miam, florida
    MS-Off Ver
    2013
    Posts
    6

    Re: Averageifs formula with criteria based on a different range

    Is there something I am missing when it comes to attaching a sample xls? That would probably be the best way to show what I have?

    In the meanwhile, using the code tags. Here is the source table with the data. Below it is the destination table where I am trying to get the average salary of the top 4 projected players for each team, currently =AVERAGEIFS(HITTERPROJECTIONS[$$],HITTERPROJECTIONS[team],[@TEAM],HITTERPROJECTIONS[Proj],">7") gives me the average salary of players above 7pts

    Table = HITTERPROJECTIONS
    Please Login or Register  to view this content.

    Destination table

    Please Login or Register  to view this content.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Averageifs formula with criteria based on a different range

    Ok, so what exactly do you want?

    Do you want the average of the top 4 salaries per team or do you want the average of the top 4 salaries with a "proj" >7 per team?

    I really can't advise you on how to attach a sample file as the process seems to be different depending on what broswer you use.

  9. #9
    Registered User
    Join Date
    12-09-2015
    Location
    miam, florida
    MS-Off Ver
    2013
    Posts
    6

    Re: Averageifs formula with criteria based on a different range

    I would like to see the average salary of the top 4 projected players. So for example On the following team, I would like to see the average salary of Paul Golds, Jake Lamb, Jean Segura & Chris Herrmann.
    When I use Proj > 7, This specific team has 5 players that meet that condition which would mess up my results.


    Please Login or Register  to view this content.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Averageifs formula with criteria based on a different range

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    G
    1
    Player
    Team
    Proj
    Salary
    Team
    AVG Top 4
    2
    Paul Golds
    ARI
    9.54
    $4,200
    ARI
    $3,475
    3
    Jake Lamb
    ARI
    7.33
    $3,300
    PIT
    $6,525
    4
    Jean Segura
    ARI
    7.07
    $3,500
    5
    Chris Herrmann
    ARI
    7.02
    $2,900
    6
    Brandon Drury
    ARI
    7.01
    $2,200
    7
    Michael Bourn
    ARI
    6.3
    $2,700
    8
    Yasmany Tomas
    ARI
    5.79
    $2,900
    9
    Chris Owings
    ARI
    5.76
    $3,000
    10
    Andy Van Slyke
    PIT
    9.54
    $5,200
    11
    Barry Bonds
    PIT
    7.33
    $5,100
    12
    Sid Bream
    PIT
    7.07
    $9,200
    13
    Willie Stargell
    PIT
    7.02
    $6,600
    14
    Bob Walk
    PIT
    7.01
    $5,000
    15
    ------
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in G2 and copied down:

    =AVERAGE(IF(B$2:B$14=F2,IF(C$2:C$14>=LARGE(IF(B$2:B$14=F2,C$2:C$14),4),D$2:D$14)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  11. #11
    Registered User
    Join Date
    12-09-2015
    Location
    miam, florida
    MS-Off Ver
    2013
    Posts
    6

    Re: Averageifs formula with criteria based on a different range

    That works perfectly!!!

    Thank you for the assistance and the extra patience with me. Much appreciated

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Averageifs formula with criteria based on a different range

    You're welcome. Thanks for the feedback!

+ 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. AVERAGEIFS with multiple criteria on one range
    By ctsmith84 in forum Excel General
    Replies: 7
    Last Post: 04-23-2020, 11:31 PM
  2. [SOLVED] AVERAGEIFS using two different criteria for one range
    By KomicJ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-30-2016, 03:51 PM
  3. [SOLVED] AVERAGEIFS formula where criteria range can be either of two value
    By lostest in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-27-2015, 01:01 PM
  4. [SOLVED] Averageifs formula same range but two different criteria
    By Alphabex in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-21-2015, 05:48 PM
  5. [SOLVED] AverageIFS multiple criteria in one range
    By AndreaJean18 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-02-2015, 10:30 AM
  6. AVERAGEIFS and range for criteria?
    By MaverickBlack in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-13-2015, 05:35 AM
  7. [SOLVED] Macro for AverageIFS, with multiple criteria in the same criteria range
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 05-24-2014, 01:13 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