Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Making 5 Minute Wind Averages

Right now, I have data that is in 1 minute wind speed and direction (in
degrees) averages. I need to convert it to 5 minute averages (that is the
average from time 0-5min, 6-10min, 11-15 min and so on). I've attempted to
use the text and indirect functions to do this, but it ends up over lapping
(i get averages from 0-5, then 5-9, then 9-13). What kind of code or
functions can I write to make this work?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Making 5 Minute Wind Averages

On Sat, 10 Nov 2007 11:22:01 -0800, Larissa
wrote:

Right now, I have data that is in 1 minute wind speed and direction (in
degrees) averages. I need to convert it to 5 minute averages (that is the
average from time 0-5min, 6-10min, 11-15 min and so on). I've attempted to
use the text and indirect functions to do this, but it ends up over lapping
(i get averages from 0-5, then 5-9, then 9-13). What kind of code or
functions can I write to make this work?


I assume your data of windspeeds is in B2:Bn, and that there is one entry per
minute.

To return the averages, stepping five each time, you could use a formula like:

=AVERAGE(OFFSET($B$2,(ROWS($A$1:A1)-1)*5,0,5))

If you fill down, each subsequent entry will average the next five items.

1-5
6-10
11-15

etc.

(The ROWS function is only to provide a counter, and has no relation to the
storage of any of your data.)

(If your data begins in a cell other than b2, merely change that one variable
-- but be sure to use the absolute addressing mode).

--ron
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Making 5 Minute Wind Averages



"Ron Rosenfeld" wrote:

On Sat, 10 Nov 2007 11:22:01 -0800, Larissa
wrote:

Right now, I have data that is in 1 minute wind speed and direction (in
degrees) averages. I need to convert it to 5 minute averages (that is the
average from time 0-5min, 6-10min, 11-15 min and so on). I've attempted to
use the text and indirect functions to do this, but it ends up over lapping
(i get averages from 0-5, then 5-9, then 9-13). What kind of code or
functions can I write to make this work?


I assume your data of windspeeds is in B2:Bn, and that there is one entry per
minute.

To return the averages, stepping five each time, you could use a formula like:

=AVERAGE(OFFSET($B$2,(ROWS($A$1:A1)-1)*5,0,5))

If you fill down, each subsequent entry will average the next five items.

1-5
6-10
11-15

etc.

(The ROWS function is only to provide a counter, and has no relation to the
storage of any of your data.)

(If your data begins in a cell other than b2, merely change that one variable
-- but be sure to use the absolute addressing mode).

--ron

You are amazing. Works perfectly. Thank you SO much!!!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Making 5 Minute Wind Averages

On Sat, 10 Nov 2007 11:49:00 -0800, Larissa
wrote:

You are amazing. Works perfectly. Thank you SO much!!!


Glad to help. Thanks for the feedback.
--ron
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
convert time from 60 minute hour to 100 minute hour Jboerding Excel Discussion (Misc queries) 2 July 6th 05 11:30 PM
convert 100 minute hour to a 60 minute hour Todd Excel Worksheet Functions 1 November 15th 04 06:14 PM
help with excel macros getting daily averages from 10 minute data jen Excel Programming 2 November 10th 03 08:31 PM
help with macros for getting daily averages from 10 minute increment data - MS2000 Bernie Deitrick[_2_] Excel Programming 0 November 7th 03 06:47 PM
help with macros for getting daily averages from 10 minute increment data - MS2000 Keith R[_3_] Excel Programming 0 November 7th 03 06:21 PM


All times are GMT +1. The time now is 02:30 AM.

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"