+ Reply to Thread
Results 1 to 7 of 7

Average for non-consecutive cells, excluding zero values.

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    41

    Average for non-consecutive cells, excluding zero values.

    Hello. I have a budget spreadsheet that I am working on, and I would like to average certain values from every month, but only if they are greater than zero (to exclude months we haven't reached yet), but there are also cells with data that are in between the cells that I need to average. For example, I need to average cells D8,D11,D14,D17,D20,D23,D26,D29,D32,D35,D38,D41, and only these cells as long as each cell is greater than zero.

    Thanks a lot for the help,


    Andrew

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    13,764

    Re: Average for non-consecutive cells, excluding zero values.

    it can be done with an pivot table.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    09-28-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Average for non-consecutive cells, excluding zero values.

    I actually haven't used a pivot table before. Will that require me to devote additional space/cells to accomplish this? If so, I don't really have a good place to put it. If not, could you tell me how I would set that up?

    Thanks,


    Andrew

  4. #4
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: Average for non-consecutive cells, excluding zero values.

    Have you got any consistent "row labels" in an adjacent column? If so that might make it easier to average, otherwise try this formula

    =SUM(D8,D11,D14,D17,D20,D23,D26,D29,D32,D35,D38,D41)/MAX(1,INDEX(FREQUENCY((D8,D11,D14,D17,D20,D23,D26,D29,D32,D35,D38,D41),0),2))
    Audere est facere

  5. #5
    Registered User
    Join Date
    09-28-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Average for non-consecutive cells, excluding zero values.

    Here is what I have. I do have row labels for the months, but obviously each month has a different label.

    example.xlsx

  6. #6
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: Average for non-consecutive cells, excluding zero values.

    Try using AVERAGEIFS like this

    =AVERAGEIFS(D8:D41,$B8:$B41,"*2013",D8:D41,">0")

  7. #7
    Registered User
    Join Date
    09-28-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Average for non-consecutive cells, excluding zero values.

    Ok, that worked great, thanks a lot for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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