# Thread: Average (2000)

1. ## 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. ## 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)

3. ## 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. ## 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
•