hello everybody,
i need to do an assignment but i have no real clue how to solve it. i would really appreciate if you could give me a hand with this.
Here are the instructions for completing the exercise:
-save the attached Excel file (exercise.xls) to your PC and open this file
on the 'data' sheet you'll find 2.5 months of stock index data for Nasdaq, CAC and FTSE the requirement is to create separate charts for each index showing the index movement against date, together with 5-day and 10-day moving averages
Suggested method:
insert a new code module for your code
use the 'calcs' sheet to do calculations (in code) of index, 5 and 10 day moving averages; try getting this right just for one index first before writing a loop to run over all indices
5-day average is over the last 5 days; 10 day average is over the last 10 days - therefore some cells are blank (see attachment)
important techniques:
-to point to a spreadsheet cell: shtData.Cells(5, 1)
-to point to a spreadsheet range: shtData.Range(shtData.Cells(1, 1), shtData.Cells(20, 4))
-add a command button to the data sheet from which the code is triggered
-delete existing charts before redrawing (see code from previous exercise)
-your code should not contain any hard-coded index names
-your code should be flexible enough to deal with adding more column data (indices e.g. DAX, DJI) or more rows of dates - if such data was added (in other words there should be no hard-coding of last row or last column values)
-follow best practices in coding (e.g. comments, indentation, breaking code into separate routines, etc.)
i would really appreciate your help. thanks so much in advance. i guess for some of you this might be a piece of cake.
cheers,
claudio
Bookmarks