Thread: Nested Function
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Biff Biff is offline
external usenet poster
 
Posts: 1,688
Default Nested Function

I've seen this exact same question before. This must stump some students!

I'm not sure how to use the COUNT function to give me a 3 since all 4
cells
will have amounts?


Well, think about it. You have 4 numbers but you want to exclude the
minimum. So, if COUNT(B4:E4) = 4 then you need to subtact 1 for the minimum.

The answer that's expected:

=(SUM(B4:E4)-MIN(B4:E4))/(COUNT(B4:E4)-1)

Now, here's how you would do this in the real world:

=AVERAGE(SMALL(B4:E4,{2,3,4}))

However, you'd be assuming that there are in fact 4 numbers in the range. If
you want to be really robust about it:

=IF(COUNT(B4:E4)=0,0,IF(COUNT(B4:E4)1,(SUM(B4:E4)-MIN(B4:E4))/(COUNT(B4:E4)-1),SUM(B4:E4)))

Biff

"mrfrenchy" wrote in message
...
Hi, I am trying complete a project where I need to use nested functions.
The
scenario is I have 4 amounts that are grades. The lowest grade is
dropped,
and the remaining 3 are averaged to give the grade. I have to use the
SUM,
MIN and COUNT function within the same cell address to get the answer.
Here is where I'm stuck...
=SUM(B4:E4)-MIN(B4:E4)
I'm not sure how to use the COUNT function to give me a 3 since all 4
cells
will have amounts? Plus how will I get the above to give me an average?
ANy
help appreciated so I can sleep. :-)