Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default program for filtering data.

Hi,

i want to write some code that will do the following.

if i select some numerical data in the excel column, the program shoul
find out the average and standard deviation of the selected data. the
it should put "0" in the column if (daat average+divation AND data
average + diviation) otherwise it should keep the original data. it i
not necessary to see the standard deviation.

hope you understand what i want to do.

dilse

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default program for filtering data.

'set rng = Range(cells(1,1),Cells(1,1).End(xldown)

set rng = Selection
ave = Application.Average(rng)
stdev = Application.Stdev(rng)
for each cell in rng
if cell.Value ave+stdev or cell.value < cell-stdev then
cell.Value = 0
end if
Next


or if you want to change the values within 1 std dev

If cell.value < ave + stdev and cell.Value ave - stdev then

Your stated criteria doesn't make any sense:
(daat average+divation AND data <
average + diviation)


--
Regards,
Tom Ogilvy

dilsenahin wrote in message
...
Hi,

i want to write some code that will do the following.

if i select some numerical data in the excel column, the program should
find out the average and standard deviation of the selected data. then
it should put "0" in the column if (daat average+divation AND data <
average + diviation) otherwise it should keep the original data. it is
not necessary to see the standard deviation.

hope you understand what i want to do.

dilse.


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filtering of data - autmatically based on data on other sheet uptonfamilywa Excel Discussion (Misc queries) 1 June 20th 09 12:46 AM
Copying data to an external Program Debby Bunce New Users to Excel 1 June 9th 05 12:31 AM
Dropping Data to a VB.net Program BrianElson Excel Programming 1 December 16th 03 12:37 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM
Get data from another program to Excel Magnus[_3_] Excel Programming 4 July 26th 03 08:57 AM


All times are GMT +1. The time now is 02:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"