+ Reply to Thread
Results 1 to 8 of 8

Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

  1. #1
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

    I have a range with about 1000+ items.

    Some of them have values of zero

    Also, some of the values are very low or very high.

    So, I need a formula to remove highest 1/3 of values and lowest 1/3 of NON-ZERO values and get average of the remaining. (Column H on the attached spreadsheet has some zero values. So, I want to have 120 values which are non-zeros. I need something like
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by saravnepali; 07-30-2020 at 04:47 AM.
    If you think someone helped you, click on the "* Add Reputation" as a way to say thank you.

    If your problem is solved, go to Thread Tools and select Mark This Thread Solved

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

    Post a sample sheet

  3. #3
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Re: Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

    Pepe Le Mokko

    Sample sheet added.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,428

    Re: Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

    Perhaps the following will help.
    Cell J1 finds the count of non blank cells in column H using: =COUNT(H2:H155)
    Cells I2 and down rank the non blank cells in column H using: =IF(H2="","",RANK.EQ(H2,H$2:H$155,0))
    Cells J2 and down get the value of the middle 1/3 of the non blank cells in column H using: =IF(OR(I2="",I2<=40,I2>=80),"",H2)
    Cell M1 displays the average of the values in column J using: =AVERAGE(J2:J155)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Re: Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

    Thanks JeteMc

    I appreciate the help.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

    I use different method

    =AVERAGEIFS(H3:H155,H3:H155,">"&PERCENTILE.INC(H3:H155,1/3),H3:H155,"<="&PERCENTILE.INC(H3:H155,2/3))
    or
    =AVERAGE(INDEX(SMALL(H3:H155,ROW(INDEX(H:H,COUNT(H3:H155)/3+1):INDEX(H:H,COUNT(H3:H155)*2/3))),))

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,428

    Re: Take average of a range -- excluding top 1/3 and bottom 1/3 and zero values

    You're Welcome and thank you for the feedback. I hope that you have a blessed day.

+ 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. [SOLVED] How to Average values of Top/bottom 3 of another column
    By TK2013 in forum Excel General
    Replies: 7
    Last Post: 07-14-2019, 08:33 AM
  2. [SOLVED] Average every other row excluding 0 values
    By redguy44 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-02-2016, 02:13 PM
  3. average excluding zero's not in a range
    By ldurham in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-15-2016, 12:36 PM
  4. Average the bottom 95$ of values
    By shauncie in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-02-2016, 03:27 PM
  5. [SOLVED] Average excluding percentiles (top/bottom nth percent)
    By ker9 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2014, 04:34 PM
  6. Average excluding Div/0 but not in range.
    By olga6542 in forum Excel General
    Replies: 19
    Last Post: 06-15-2010, 08:13 PM
  7. Average excluding negative values
    By tangomj in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-20-2007, 02:27 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