+ Reply to Thread
Results 1 to 6 of 6

Average every other row excluding 0 values

  1. #1
    Registered User
    Join Date
    09-02-2016
    Location
    Colorado
    MS-Off Ver
    Excell 2013
    Posts
    3

    Average every other row excluding 0 values

    I am trying to get the average of data every other row, M4:M16. I am able to get the average of that going every other row using, =LOOKUP(9.99999999999999E+307,CHOOSE({1,2},0,AVERAGE(IF(ISNUMBER(M3:M22)*(MOD(ROW(M3:M22),2)=0),M3:M22)))), and hitting ctrl+shift+enter. I am wondering if there is a way to do this and filter out the 0's so it doesn't average the 0 as well. Right now if I put a 25 in one of the days I would like it to say 25 instead of 3.5714285.

  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: Average every other row excluding 0 values

    Let me ask ya a question...

    If you want to average the range M4:M16 why is your formula referencing the range M3:M22?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    09-02-2016
    Location
    Colorado
    MS-Off Ver
    Excell 2013
    Posts
    3

    Re: Average every other row excluding 0 values

    This is a new formula to me and was just grabbing a random range to see if it worked. I will be changing it to the correct rows.

  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: Average every other row excluding 0 values

    Try one of these array formulas**:

    Data Range
    M
    N
    O
    4
    45
    36
    5
    14
    36
    6
    0
    7
    97
    8
    9
    98
    10
    23
    11
    35
    12
    0
    13
    62
    14
    23
    15
    95
    16
    53
    17
    ------
    ------
    ------


    If you will never insert new rows before the range:

    =AVERAGE(IF(MOD(ROW(M4:M16),2)=0,IF(M4:M16<>0,M4:M16)))

    If you might insert new rows before the range:

    =AVERAGE(IF(MOD(ROW(M4:M16)-ROW(M4),2)=0,IF(M4:M16<>0,M4:M16)))

    Both formulas are array formulas.

    ** 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
    09-02-2016
    Location
    Colorado
    MS-Off Ver
    Excell 2013
    Posts
    3

    Re: Average every other row excluding 0 values

    Thank you so much. This worked great!

  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: Average every other row excluding 0 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)

Similar Threads

  1. Returning Average value while excluding error values
    By Stromming in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-02-2014, 04:13 PM
  2. Replies: 1
    Last Post: 03-03-2014, 11:06 AM
  3. [SOLVED] Average for non-consecutive cells, excluding zero values.
    By musik7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2013, 06:11 PM
  4. The rank of average ranks excluding empty cells but including their average.
    By Terminal45 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-21-2012, 03:44 AM
  5. Calculating average excluding null and n/a values
    By andybocchi in forum Excel General
    Replies: 2
    Last Post: 01-30-2012, 08:31 AM
  6. Average excluding negative values
    By tangomj in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-20-2007, 02:27 PM
  7. Excluding Exceptional Values when Calculating an Average
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-29-2005, 07:41 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