+ Reply to Thread
Results 1 to 5 of 5

Alternative TRIMMEAN

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    79

    Alternative TRIMMEAN

    Hello,

    I am looking to see if there is a way to (auto) formulate an average omitting the top x% and bottom x%, where each % are different. As opposed to TRIMMEAN which is the same for top and bottom.

    For example. To omit the top 20% and bottom 10% I can do it like so. Data in rows 1-10

    =(SUM(A1:A20)-SUM(LARGE(A1:A20,{1,2}))-SUM(SMALL(A1:A20,{1})))/(COUNT(A1:A20)-3)

    So the top 2 (20%) and bottom 1 (10%) are omitted from the sum and then divided by the count less the 3 omitted.

    Is there any way to rewrite this formula to be more on going and keeping the %'s? For example, If I added 10 more rows of data, the formula would automatically exclude the top 4 and bottom 2? Assuming I always had a range larger than needed.

    Thank you so much for any replies and help that may come.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445

    Re: Alternative TRIMMEAN

    Hi,

    does this averageifs help at all?

    =AVERAGEIFS(A1:A100,A1:A100,"<"&80%*MAX(A1:A100),A1:A100,">"&10%*MAX(A1:A100))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Alternative TRIMMEAN

    =AVERAGE(INDEX(LARGE(A1:A100,ROW(INDIRECT(FLOOR(COUNT(A1:A100)*20%,1)+1&":"&COUNT(A1:A100)-FLOOR(COUNT(A1:A100)*10%,1)))),0))
    try this
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Forum Contributor
    Join Date
    01-28-2014
    Location
    Turkey
    MS-Off Ver
    Excel 2013
    Posts
    159

    Re: Alternative TRIMMEAN

    Please Login or Register  to view this content.
    This in an array formula and so must be confirmed with CTRL+SHIFT+ENTER and not just ENTER

  5. #5
    Registered User
    Join Date
    01-08-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    79

    Re: Alternative TRIMMEAN

    =AVERAGEIFS(A1:A100,A1:A100,"<"&80%*MAX(A1:A100),A1:A100,">"&10%*MAX(A1:A100))

    When I use this formula it gives me an average of 4.5 on a range containing number 1-10. Using those numbers, the formula should average only number 2-8, omitting 1 for the bottome 10% and 9&10 for the top 20%. The average of 2-8 is 5.


    =AVERAGE(INDEX(LARGE(A1:A100,ROW(INDIRECT(FLOOR(COUNT(A1:A100)*20%,1)+1&":"&COUNT(A1:A100)-FLOOR(COUNT(A1:A100)*10%,1)))),0))

    This worked!


    =AVERAGE(IF(A1:A10>PERCENTILE(A1:A10,0.1),IF(A1:A10<PERCENTILE(A1:A10,0.8),A1:A10)))

    This worked only on a range from A1:A:10. When I increase the range the final number changes.

+ 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] Trimmean in Pivot Table
    By botanybob in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-11-2014, 11:03 AM
  2. [SOLVED] Using TRIMMEAN on a selection of data
    By Krogerstrom in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-05-2013, 06:50 AM
  3. [SOLVED] TRIMMEAN & OFFSET together
    By JTM1200 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-11-2012, 05:23 PM
  4. Can i use trimmean in pivot tables
    By drooks in forum Excel General
    Replies: 1
    Last Post: 10-23-2008, 11:22 AM
  5. TRIMMEAN with different percentiles?
    By [email protected] in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-14-2006, 01:15 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