+ Reply to Thread
Results 1 to 6 of 6

Average excluding negative values

  1. #1
    Registered User
    Join Date
    07-12-2006
    Posts
    54

    Talking Average excluding negative values

    I have a range: B2:B700 with both positive and negative values.

    How can I calculate the basic AVERAGE, MIN, MAX, and SUM while "excluding" all negative values within the range?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    =AVERAGE(IF(B2:B700>0,B2:B700))

    Confirm with CTRL+SHIFt+ENTER, not just enter

    Subsitute MIN/MAx for average when necessary

  3. #3
    Registered User
    Join Date
    07-12-2006
    Posts
    54
    Thanks. That worked great.

    2nd part. In addition to the above. I also want to exlcude all values greater than 1095. Will this be a nested IF statement?

    Avg IF X: 0 < X < 1095

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Try this and let me know:

    =AVERAGE(IF((B2:B700>0)*(B2:B700<1095),B2:B700))

  5. #5
    Registered User
    Join Date
    07-12-2006
    Posts
    54
    Again thanks. That worked too.

  6. #6
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Glad I could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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