+ Reply to Thread
Results 1 to 5 of 5

Calculate average excluding 0 and negative numbers

  1. #1
    Registered User
    Join Date
    05-30-2018
    Location
    Riyadh
    MS-Off Ver
    210
    Posts
    3

    Calculate average excluding 0 and negative numbers

    Hi ,

    I have a column of data that includes positive numbers, negative numbers and zeroes. different formulas,
    like =SUMIF(G5:G9,">=0")/COUNTIF(G5:G9,">=0")
    =AVERAGEIF(G5:G16,"<>0")
    but I cant seem to get an average excluding both the zeroes and negative numbers. Does anyone have an idea how to make this work in Excel ? Thanks!

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Calculate average excluding 0 and negative numbers

    Hi

    an attempt: to exclude zeros you don't need "="

    =SUMIF(G5:G9,">0")/COUNTIF(G5:G9,">0")

    To esclude negative numbers

    =AVERAGEIF(G5:G16,">0")

    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    05-30-2018
    Location
    Riyadh
    MS-Off Ver
    210
    Posts
    3

    Re: Calculate average excluding 0 and negative numbers

    Quote Originally Posted by canapone View Post
    Hi

    an attempt: to exclude zeros you don't need "="

    =SUMIF(G5:G9,">0")/COUNTIF(G5:G9,">0")

    To esclude negative numbers

    =AVERAGEIF(G5:G16,">0")

    Regards
    Thank you !!
    But i want single formula to calculate average for a range excluding negative and 0 values cells

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Calculate average excluding 0 and negative numbers

    Hi,

    thanks for your kind feedback


    =AVERAGEIF(G5:G16,">0")

    should do the trick!

  5. #5
    Registered User
    Join Date
    05-30-2018
    Location
    Riyadh
    MS-Off Ver
    210
    Posts
    3

    Re: Calculate average excluding 0 and negative numbers

    Thank You ...

+ 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. Calculate average excluding zeros in a non continguous range
    By PostMaloney in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-13-2019, 11:34 AM
  2. Replies: 21
    Last Post: 11-10-2014, 12:15 AM
  3. [SOLVED] Calculate 'average' between data range of days but excluding weekends(?)
    By iliasark in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-08-2013, 04:39 AM
  4. VBA Macro to Calculate Average excluding Duplicates
    By dani_n88 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2012, 07:55 PM
  5. Excluding negative numbers and bringing back lowest postive number
    By Dancingqueen in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 09-15-2009, 03:40 PM
  6. Average excluding negative values
    By tangomj in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-20-2007, 02:27 PM
  7. Calculate average excluding cells on conditions
    By Kfetterman1 in forum Excel General
    Replies: 0
    Last Post: 09-26-2006, 07:34 PM

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