Results 1 to 4 of 4

Thread: Average (2000)

  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Average (2000)

    How would an average formula be written to exclude the maximum and minimum values from the range to be averaged?
    Thanks,
    Jeff

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Average (2000)

    This may be over simplified for your needs but would this do, assuming data is in A1:A8

    =(SUM(A1:A8)-MAX(A1:A8)-MIN(A1:A8))/(COUNT(A1:A8)-2)
    Jerry

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Average (2000)

    There may be better approaches, but here is a naive one. Adjust the range as needed.
    <code>
    =(SUM(A1:A100)-MAX(A1:A100)-MIN(A1:A100))/(COUNT(A1:A100)-2)
    </code>
    The numerator takes the sum of the values and subtracts the maximum and minimum values.
    The denominator is the number of values minus 2 (to account for excluding the maximum and minimum values)

    The formula may or may not do what you want if multiple cells in the range are equal to the maximum or minimum value.

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Average (2000)

    <P ID="edit" class=small>(Edited by sdckapr on 13-Jun-05 11:38. Shortened formula)</P>If you have multiple values equal to the min and/or equal to the max and you want to not exclude them all (not just one of each), you can use a formula like:

    =(SUMIF(A1:A100,">"&MIN(A1:A100))-SUMIF(A1:A100,">="&MAX(A1:A100)))/(COUNTIF(A1:A100,">"&MIN(A1:A100))-COUNTIF(A1:A100,">="&MAX(A1:A100)))

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •