Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Calculate a 30-day moving average based on the last x number of entries and date


For this you can use a dynamic named range. Do you need help with this?

Inserting it into an OFFSET in your equation? yes. = ) thanks again for
your help guys.


--
gimiv
------------------------------------------------------------------------
gimiv's Profile: http://www.excelforum.com/member.php...o&userid=35726
View this thread: http://www.excelforum.com/showthread...hreadid=558670

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Calculate a 30-day moving average based on the last x number of entries and date

Assuming that Sheet1, Column B, starting at B2, contains the data, try
the following...

1) Define the following dynamic named range:

Insert Name Define

Name: Values

Refers to:

=Sheet1!$B$2:INDEX(Sheet1!$B$2:$B$65536,MATCH(9.99 999999999999E+307,Sheet
1!$B$2:$B$65536))

Click Ok

Change the references accordingly.

2) Then try the following formula, which needs to be confirmed with
CONTROL+SHIFT+ENTER...

=AVERAGE(IF(ROW(Values)=LARGE(IF(Values,ROW(Value s)),30),IF(Values,Value
s)))

Hope this helps!

In article ,
gimiv wrote:

For this you can use a dynamic named range. Do you need help with this?

Inserting it into an OFFSET in your equation? yes. = ) thanks again for
your help guys.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Calculate a 30-day moving average based on the last x number of entries and date

Note to the OP:

If you have less than 30 values < 0 you'll get a #NUM! error.

Biff

"Domenic" wrote in message
...
Assuming that Sheet1, Column B, starting at B2, contains the data, try
the following...

1) Define the following dynamic named range:

Insert Name Define

Name: Values

Refers to:

=Sheet1!$B$2:INDEX(Sheet1!$B$2:$B$65536,MATCH(9.99 999999999999E+307,Sheet
1!$B$2:$B$65536))

Click Ok

Change the references accordingly.

2) Then try the following formula, which needs to be confirmed with
CONTROL+SHIFT+ENTER...

=AVERAGE(IF(ROW(Values)=LARGE(IF(Values,ROW(Value s)),30),IF(Values,Value
s)))

Hope this helps!

In article ,
gimiv wrote:

For this you can use a dynamic named range. Do you need help with this?

Inserting it into an OFFSET in your equation? yes. = ) thanks again for
your help guys.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Calculate a 30-day moving average based on the last x number of entries and date

Thanks Biff! Where do I send my cheque... <VBG

In article ,
"Biff" wrote:

Note to the OP:

If you have less than 30 values < 0 you'll get a #NUM! error.

Biff

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Calculate a 30-day moving average based on the last x number of entries and date


Biff Wrote:
Note to the OP:

If you have less than 30 values < 0 you'll get a #NUM! error.

Biff

"Domenic" wrote in message
...
Assuming that Sheet1, Column B, starting at B2, contains the data,

try
the following...

1) Define the following dynamic named range:

Insert Name Define

Name: Values

Refers to:


=Sheet1!$B$2:INDEX(Sheet1!$B$2:$B$65536,MATCH(9.99 999999999999E+307,Sheet
1!$B$2:$B$65536))

Click Ok

Change the references accordingly.

2) Then try the following formula, which needs to be confirmed with
CONTROL+SHIFT+ENTER...


=AVERAGE(IF(ROW(Values)=LARGE(IF(Values,ROW(Value s)),30),IF(Values,Value
s)))

Hope this helps!

In article ,
gimiv wrote:

For this you can use a dynamic named range. Do you need help with

this?

Inserting it into an OFFSET in your equation? yes. = ) thanks again

for
your help guys.


Wow, this worked perfectly. Hate to be a pain, but can you explain how
you went about the logic to achieve this statement or does that just
come with years and years of experience. I mean, to be able to identify
the problem and match it to the right complex formula?


--
gimiv
------------------------------------------------------------------------
gimiv's Profile: http://www.excelforum.com/member.php...o&userid=35726
View this thread: http://www.excelforum.com/showthread...hreadid=558670



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Calculate a 30-day moving average based on the last x number of entries and date

In article ,
gimiv wrote:

Wow, this worked perfectly. Hate to be a pain, but can you explain how
you went about the logic to achieve this statement or does that just
come with years and years of experience. I mean, to be able to identify
the problem and match it to the right complex formula?


Basically, I watch and learn from others who are more experienced. It's
amazing what one can learn by frequenting these newsgroups, forums,
etc...
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
Count/Sum data with date entries. KBW Excel Worksheet Functions 6 April 5th 06 07:32 PM
Counting distinct entries based on meeting month & year criteria jennifer Excel Worksheet Functions 3 February 9th 06 01:56 PM
counting date entries by month & year Di Excel Worksheet Functions 7 August 24th 05 08:39 PM
counting specified date entries dave Excel Worksheet Functions 2 November 11th 04 09:28 AM
Count data entries and date problem Gef Excel Worksheet Functions 5 November 4th 04 02:30 PM


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