Help with formula


Posted by Paul on October 06, 2001 9:29 AM

I have 50,50,25,25 in cells A3:A6 in B1 I have =SUM($A$3:$A$25)-(MAX($A$3:$A$25))-(MIN($A$3:$A$25)) this gives me 75, that is the right answer, what I want to do is to divide that number,75, by the non-blank cells in A3:A25, minus 2. I want to take 2 away from the counta before it does the division. I have tried the formula =SUM($A$3:$A$25)-(MAX($A$3:$A$25))-(MIN($A$3:$A$25))/(COUNTA($A$3:$A$25-2)). This dose not work, how would the formula need to be changed. The answer should be 37.5 Thanks

Posted by Aladin Akyurek on October 06, 2001 10:55 AM


Paul,

Use

either

=(SUM($A$3:$A$25)-MAX($A$3:$A$25)-MIN($A$3:$A$25))/(max(1,COUNTIF($A$3:$A$25,">0"))

if the range A3:A25 consists solely of positive numbers and/or blank cells,

or

=(SUM($A$3:$A$25)-MAX($A$3:$A$25)-MIN($A$3:$A$25))/max(1,SUMPRODUCT(ISNUMBER($A$3:$A$25)+0))

if the range consists of positive as well as negative numbers and/or blank cells.

Aladin

========

=SUM($A$3:$A$25)-(MAX($A$3:$A$25))-(MIN($A$3:$A$25)) this gives me 75, that is the right answer, what I want to do is to divide that number,75, by the non-blank cells in A3:A25, minus 2. I want to take 2 away from the counta before it does the division. I have tried the formula =SUM($A$3:$A$25)-(MAX($A$3:$A$25))-(MIN($A$3:$A$25))/(COUNTA($A$3:$A$25-2)). This dose not work, how would the formula need to be changed. The answer should be 37.5 Thanks

Posted by Aladin Akyurek on October 06, 2001 11:03 AM

By the way,

COUNT will also do, because it ignores blank cells.

Just use:

=(SUM($A$3:$A$25)-MAX($A$3:$A$25)-MIN($A$3:$A$25))/COUNT($A$3:$A$25)

Aladin

======

Posted by Paul on October 06, 2001 11:44 AM

Re: By the way,

Aladin: this is dividing the number by the number of non blank cells(4) in A3:A25.I need to take two away from the number of non blank cell before I do the division something like this =COUNT(A3:A25)-2 this works when placed in a cell but I can't get it to work in the formula

Posted by Paul on October 06, 2001 11:53 AM

I think I got it,Thanks for the help Aladin


=(SUM($A$3:$A$25)-MAX($A$3:$A$25)-MIN($A$3:$A$25))/(COUNT($A$3:$A$25)-2)

Posted by Aladin Akyurek on October 06, 2001 11:56 AM

What is...

that 2? Is that the number of blank cells in A3:A25? I seem to miss something here.

Aladin

Posted by Aladin Akyurek on October 06, 2001 12:08 PM

Don't tell: 1 for the Max value and 1 for the Min value ==> 2. (NT)



Posted by Paul on October 06, 2001 2:08 PM

Yes, subtracting for the min & max, I should have made it clearer