View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
lawdoggy lawdoggy is offline
external usenet poster
 
Posts: 12
Default Help with Averaging Numbers within Standard Deviation

On Oct 15, 2:31*pm, p45cal wrote:
lawdoggy;526336 Wrote:

I'm trying to average only the numbers that fall within the standard
deviation. Say you have 10 numbers listed and only 7 fall in the range
of the standard deviation of the list. I need the average of only
those number that fit. I've tried several different ways but nothing
is working. Any help would be greatly appreciated!!


Thanks...mitch


This is for 1 SD either side of the mean, where K7 contained the mean,
K8 the SD, and the sample data was in range F8:F31 :

Code:
--------------------
* * =(SUM(--(IF(F8:F31(K7-K8),1,0)*IF(F8:F31<(K7+K8),1,0)*F8:F31)))/(COUNTIF(F*8:F31,"=" & K7-K8)-COUNTIF(F8:F31,"" & K7+K8))
--------------------

alternatively, this can all be put in one cell:

Code:
--------------------
* * =(SUM(--(IF(F8:F31(AVERAGE(F8:F31)-STDEV(F8:F31)),1,0)*IF(F8:F31<(AVERAGE(*F8:F31)+ST DEV(F8:F31)),1,0)*F8:F31)))/(COUNTIF(F8:F31,"=" & AVERAGE(F8:F31)-STDEV(F8:F31))-COUNTIF(F8:F31,"" & AVERAGE(F8:F31)+STDEV(F8:F31)))
--------------------
*for the same sample range.

--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile:http://www.thecodecage.com/forumz/member.php?userid=558
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=144559


Wow!! no wonder i never figured it out. Thank you. I will mess with it
and see if I can get it to work. Thank you!

mitch