+ Reply to Thread
Results 1 to 3 of 3

Formula to exclude outliers and calculate the average, min and max

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2021
    Posts
    1,013

    Formula to exclude outliers and calculate the average, min and max

    Morning all,

    I'm trying to calculate the average, min and max we have paid for a range of services. The data contains some outliers though which I would like to exclude from the calculation. My initial thought is to trim the top and bottom 10% (% may change?) and see how that looks. I've attached some sample data and the output I would expect to see.

    NB - The actual data is mixed and hence will need to incorporate the service name into the calculation, my sample data is grouped for simplicity.

    Thanks in advance,

    Snook

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

    Re: Formula to exclude outliers and calculate the average, min and max

    Please try at
    E4 better use TRIMMEAN

    =TRIMMEAN(IF($A$2:$A$31=$D4,$B$2:$B$31),20%)



    =AVERAGEIFS($B$2:$B$31,$A$2:$A$31,$D4,$B$2:$B$31,">"&PERCENTILE.INC(IF($A$2:$A$31=$D4,$B$2:$B$31),10%),$B$2:$B$31,"<"&PERCENTILE.INC(IF($A$2:$A$31=$D4,$B$2:$B$31),90%))


    F4 MS365
    =MINIFS($B$2:$B$31,$A$2:$A$31,$D4,$B$2:$B$31,">"&PERCENTILE.INC(IF($A$2:$A$31=$D4,$B$2:$B$31),10%))

    F4 other Version
    =AGGREGATE(15,6,$B$2:$B$31/($B$2:$B$31>PERCENTILE.INC(IF($A$2:$A$31=$D4,$B$2:$B$31),10%))/($A$2:$A$31=$D4),1)

    G4 MS365
    =MAXIFS($B$2:$B$31,$A$2:$A$31,$D4,$B$2:$B$31,"<"&PERCENTILE.INC(IF($A$2:$A$31=$D4,$B$2:$B$31),90%))

    G4 other Version
    =AGGREGATE(14,6,$B$2:$B$31/($B$2:$B$31<PERCENTILE.INC(IF($A$2:$A$31=$D4,$B$2:$B$31),90%))/($A$2:$A$31=$D4),1)
    Last edited by Bo_Ry; 10-16-2020 at 06:09 AM.

  3. #3
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2021
    Posts
    1,013

    Re: Formula to exclude outliers and calculate the average, min and max

    Cheers Bo_Ry, that's exactly what I was after. The rep police won't allow me to credit you but I'll do it once it's enabled.

    NB (for others) - These solutions are array formulas.

    Snook

+ 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. How do I calculate an average and exclude the null values?
    By Kalkul8 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2020, 02:51 AM
  2. [SOLVED] How to Calculate an Average to exclude zeros and the largest value
    By rslush91 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-04-2018, 02:15 PM
  3. Calculate Rolling Average of exclude zero and Weekday
    By AmitSharma in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-22-2016, 05:04 PM
  4. [SOLVED] Calculate average and standard deviation for each year and exclude 0s
    By excelas88 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-01-2015, 05:37 PM
  5. [SOLVED] Formula for average minus outliers
    By Granny Nanny in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-20-2012, 09:38 AM
  6. Exclude outliers in average calculation excel
    By mkvassh in forum Excel General
    Replies: 6
    Last Post: 10-15-2009, 08:36 AM
  7. [SOLVED] how to exclude data outliers from formula or chart without deleti.
    By Michael J in forum Excel General
    Replies: 3
    Last Post: 03-17-2005, 05:06 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