Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvin Lab Rat
 
Posts: n/a
Default thin # of samples by averaging

I have large columns of data (4000 to 5000 entrys) I would like to thin the
data out or reduce the number of samples by building a new column of groups
of average values. For example:
3 reduce by average groups of 3 3
3 5
3 7
4
5
6
7
7
7
If any one can offer some advise
Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Otto Moehrbach
 
Posts: n/a
Default thin # of samples by averaging

The following macro does what you want. As written, the column of data is
Column A starting in A1 and the averages are placed in Column B starting in
B1. Nothing is done to the data in Column A. HTH Otto
Sub ThinOut()
Dim c As Long
Dim Dest As Range
Set Dest = [B1]
c = 0
[A1].Select
Do
Dest.Value = Application.Average(ActiveCell.Offset(c).Resize(3) )
c = c + 3
Set Dest = Range("B" & Rows.Count).End(xlUp).Offset(1)
Loop Until Application.CountA(ActiveCell.Offset(c).Resize(3)) = 0
End Sub
"Arvin Lab Rat" <Arvin Lab wrote in message
...
I have large columns of data (4000 to 5000 entrys) I would like to thin
the
data out or reduce the number of samples by building a new column of
groups
of average values. For example:
3 reduce by average groups of 3 3
3 5
3 7
4
5
6
7
7
7
If any one can offer some advise
Thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvin Lab Rat
 
Posts: n/a
Default thin # of samples by averaging

Thanks I can't wait to try it.

"Otto Moehrbach" wrote:

The following macro does what you want. As written, the column of data is
Column A starting in A1 and the averages are placed in Column B starting in
B1. Nothing is done to the data in Column A. HTH Otto
Sub ThinOut()
Dim c As Long
Dim Dest As Range
Set Dest = [B1]
c = 0
[A1].Select
Do
Dest.Value = Application.Average(ActiveCell.Offset(c).Resize(3) )
c = c + 3
Set Dest = Range("B" & Rows.Count).End(xlUp).Offset(1)
Loop Until Application.CountA(ActiveCell.Offset(c).Resize(3)) = 0
End Sub
"Arvin Lab Rat" <Arvin Lab wrote in message
...
I have large columns of data (4000 to 5000 entrys) I would like to thin
the
data out or reduce the number of samples by building a new column of
groups
of average values. For example:
3 reduce by average groups of 3 3
3 5
3 7
4
5
6
7
7
7
If any one can offer some advise
Thanks in advance




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvin Lab Rat
 
Posts: n/a
Default thin # of samples by averaging

I tried the macro and it works great!!!!!
Thanks for your help!!


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
Averaging using relative references across sheets [email protected] Excel Discussion (Misc queries) 0 January 30th 06 01:57 PM
Columns showing up as thin vertical lines Lee Excel Discussion (Misc queries) 1 October 26th 05 03:16 PM
Changing the range of several averaging functions Hellion Excel Discussion (Misc queries) 1 September 17th 05 02:12 PM
Averaging GWit Excel Discussion (Misc queries) 1 May 29th 05 02:46 AM
Excel & 'Thin Client' experience anyone ? Timboo Excel Discussion (Misc queries) 0 January 5th 05 02:05 PM


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

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

About Us

"It's about Microsoft Excel"