+ Reply to Thread
Results 1 to 5 of 5

Averaging Columns Containing 0s Based On 2 Criterias

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    14

    Averaging Columns Containing 0s Based On 2 Criterias

    I have a worksheet with 2 tables. Table 1 has NBA players, their team, and 14 columns each showing minutes played in each of the last 14 games. Table 2 is a list of injured NBA players and the team they play for.

    I'm trying to add 1 more column to table 1. If a player's team does not appear in table 2, it's simply an average of all 14 columns for a given player on that team. If a player does appear in table 2, I'd like to average only the columns where there are 0s for that player and only for players who play on the same team as that player. I know it involves an array formula and the averageifs function but I can't quite figure it out.

    See attached for the worksheet. In the attached example to describe what I'm talking about, if team=ATL, columns C to H are averaged because Kyle Korver from ATL appears in table 2. If team=MIA, columns C, D, F, G, and J are averaged because of the same reason.
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Averaging Columns Containing 0s Based On 2 Criterias

    Do you mean this:
    Attached Files Attached Files

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Averaging Columns Containing 0s Based On 2 Criterias

    If I make it right this will work only if:

    - There is one injured player per team
    - There is no duplicated player names in A column.
    (If you have duplicated names put in one team first players First name in other first players Last name.)

  4. #4
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Averaging Columns Containing 0s Based On 2 Criterias

    Hi, Please refer the attachment...
    Attached Files Attached Files
    Click just below left if it helps, Boo?ath?

  5. #5
    Registered User
    Join Date
    02-27-2013
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Averaging Columns Containing 0s Based On 2 Criterias

    Quote Originally Posted by zbor View Post
    If I make it right this will work only if:

    - There is one injured player per team
    - There is no duplicated player names in A column.
    (If you have duplicated names put in one team first players First name in other first players Last name.)
    Yes, I meant exactly that, thank you so much.

+ 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. [SOLVED] Averaging Multiple columns based on Weeknum compared to Month
    By zdonner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-14-2014, 03:43 PM
  2. Averaging Data From Multiple Columns Based on Selection
    By jelarv in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-29-2014, 02:42 AM
  3. VBA to Hide/show columns based on a filter and multiple criterias
    By Daniel B in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2014, 05:07 AM
  4. [SOLVED] Averaging a user input defined range based on values in columns
    By smit.etha in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-14-2014, 02:21 AM
  5. [SOLVED] Why can't i filter two different columns with different criterias like this
    By Claus in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-09-2005, 10:05 AM

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