Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Dynamic Rolling Average

Hi,

I am trying to create a formula that will dynamically calculate a 6 period
average based on a date. I am using Excel 2003 SP2.

Specifically:
Row 1 contains a series of dates (Week Commencing)
Row 2 contains the data I would like to average (Man Days expended during
the week)

I would like to create a calculation that uses the current date, i.e.
references a cell that contains =TODAY(), and calculates the average number
of man days expended per week for the previous six weeks so that when the
current date changes, a new six-week average is generated.

I would be happy to mail the spreadsheet if required.

I very much look forward to hearing from someone.

Thanks,

Paul
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Dynamic Rolling Average

Try something like this:

=AVERAGE(INDEX(2:2,1,MATCH(TODAY(),A1:O1,1)-6):INDEX(2:2,1,MATCH(TODAY(),A1:O1,1)-1))

Note: if the today is less than 6 weeks into your list, the formula returns
an error.
That can be prevented, but the formula would be more complicated.

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP


"Lancer940" wrote:

Hi,

I am trying to create a formula that will dynamically calculate a 6 period
average based on a date. I am using Excel 2003 SP2.

Specifically:
Row 1 contains a series of dates (Week Commencing)
Row 2 contains the data I would like to average (Man Days expended during
the week)

I would like to create a calculation that uses the current date, i.e.
references a cell that contains =TODAY(), and calculates the average number
of man days expended per week for the previous six weeks so that when the
current date changes, a new six-week average is generated.

I would be happy to mail the spreadsheet if required.

I very much look forward to hearing from someone.

Thanks,

Paul

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Dynamic Rolling Average

Create the following formulae:
in cell named 'myday': =TODAY()
in cell named 'stop': =myday-DATE(0,1,WEEKDAY(myday,2)-1)
in cell named 'start': =stop-DATE(0,1,6*7+1)

Name the area containing the dates 'dates'
Name the area containing the values 'values'


'6 period average'
=SUMPRODUCT(values*(datesstart)*(dates<stop))


Lancer940 wrote:
Hi,

I am trying to create a formula that will dynamically calculate a 6 period
average based on a date. I am using Excel 2003 SP2.

Specifically:
Row 1 contains a series of dates (Week Commencing)
Row 2 contains the data I would like to average (Man Days expended during
the week)

I would like to create a calculation that uses the current date, i.e.
references a cell that contains =TODAY(), and calculates the average number
of man days expended per week for the previous six weeks so that when the
current date changes, a new six-week average is generated.

I would be happy to mail the spreadsheet if required.

I very much look forward to hearing from someone.

Thanks,

Paul


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Dynamic Rolling Average

One way:
=SUMPRODUCT((TODAY()-A2:A100<41)*B2:B100)/SUMPRODUCT(--(TODAY()-A2:A100<41))

HTH
Kostis Vezerides

Lancer940 wrote:
Hi,

I am trying to create a formula that will dynamically calculate a 6 period
average based on a date. I am using Excel 2003 SP2.

Specifically:
Row 1 contains a series of dates (Week Commencing)
Row 2 contains the data I would like to average (Man Days expended during
the week)

I would like to create a calculation that uses the current date, i.e.
references a cell that contains =TODAY(), and calculates the average number
of man days expended per week for the previous six weeks so that when the
current date changes, a new six-week average is generated.

I would be happy to mail the spreadsheet if required.

I very much look forward to hearing from someone.

Thanks,

Paul


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Dynamic Rolling Average

Kostis,

Much appreciated, thanks.

Paul

"vezerid" wrote:

One way:
=SUMPRODUCT((TODAY()-A2:A100<41)*B2:B100)/SUMPRODUCT(--(TODAY()-A2:A100<41))

HTH
Kostis Vezerides

Lancer940 wrote:
Hi,

I am trying to create a formula that will dynamically calculate a 6 period
average based on a date. I am using Excel 2003 SP2.

Specifically:
Row 1 contains a series of dates (Week Commencing)
Row 2 contains the data I would like to average (Man Days expended during
the week)

I would like to create a calculation that uses the current date, i.e.
references a cell that contains =TODAY(), and calculates the average number
of man days expended per week for the previous six weeks so that when the
current date changes, a new six-week average is generated.

I would be happy to mail the spreadsheet if required.

I very much look forward to hearing from someone.

Thanks,

Paul





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Dynamic Rolling Average

A very elegant formula. Thank you.

"bda75" wrote:

Create the following formulae:
in cell named 'myday': =TODAY()
in cell named 'stop': =myday-DATE(0,1,WEEKDAY(myday,2)-1)
in cell named 'start': =stop-DATE(0,1,6*7+1)

Name the area containing the dates 'dates'
Name the area containing the values 'values'


'6 period average'
=SUMPRODUCT(values*(datesstart)*(dates<stop))


Lancer940 wrote:
Hi,

I am trying to create a formula that will dynamically calculate a 6 period
average based on a date. I am using Excel 2003 SP2.

Specifically:
Row 1 contains a series of dates (Week Commencing)
Row 2 contains the data I would like to average (Man Days expended during
the week)

I would like to create a calculation that uses the current date, i.e.
references a cell that contains =TODAY(), and calculates the average number
of man days expended per week for the previous six weeks so that when the
current date changes, a new six-week average is generated.

I would be happy to mail the spreadsheet if required.

I very much look forward to hearing from someone.

Thanks,

Paul



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
How to create a rolling 6 month average? anley Excel Discussion (Misc queries) 3 August 14th 06 12:41 PM
Dynamic annual average [email protected] Charts and Charting in Excel 4 July 31st 06 11:49 PM
How do I change column data based on dynamic (rolling) dates? fergusbell Excel Discussion (Misc queries) 1 July 25th 06 10:29 AM
rolling average William Okumu Excel Worksheet Functions 5 May 25th 06 03:49 PM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM


All times are GMT +1. The time now is 07:56 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"