• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Moving average

yaelcohen

Member
Hi to you

Thanks for your help

I want to get a moving average of the last 12 months for each line. I know I can do it with DATA ANALYSIS in excel but I understand that I have to do it for each stock every time while I have a long list of stocks and data.

I attached an example in this file and I appreciate your help

Thanks a lot!
 

Attachments

  • Question 23.xlsb
    9.3 KB · Views: 14
Firstly
I would rearrange you data to have Dates as Proper dates, not Year and Month
You could do that in the data or add a new column say G:
G3: =DATE(C3,D3,1)
Copy down

Then setup a list of dates and an Input for the Stock No.
Then use an Averageifs() function

see attached file
 

Attachments

  • Question 23.xlsb
    10.2 KB · Views: 8
Thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
it works

I really appreciate the help here, it saves a lot of gray hairs :)
 
Back
Top