+ Reply to Thread
Results 1 to 4 of 4

Averaging every 48 cells of only positive values

  1. #1
    Registered User
    Join Date
    05-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Averaging every 48 cells of only positive values

    I can easily average up the 48 rows that are positive with something simple like =AVERAGEIF(D1:D48,">0",D1:D48). However I want it to work like my just normal average formula worked which was =AVERAGE(OFFSET(D$1, 48 * (ROW() - 1), 0, 48)) because i have 17,520 cells in the row to calculate the average of every 48 cells only positive numbers. Any ideas or formulas that would work?

  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: Averaging every 48 cells of only positive values

    Does that mean you want the average of:

    D1:D48
    D49:D96
    D97:D144
    D145:D192
    etc
    etc

    If so, try this...

    Entered in F1 and copied down as needed:

    =AVERAGEIF(OFFSET(D$1,ROWS(F$1:F1)*48-1,,-48),">=0")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Averaging every 48 cells of only positive values

    That worked beautifully! I couldn't figure out how to tie the codes together, thank you so much!

  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: Averaging every 48 cells of only positive values

    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)

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