Hi,
I want to compare the percent growth of various stocks that I am following. The percent calulation starts in column B, row 5 extending to column Y. Stock names are in row 4 starting in column B. Dates are in column A.
The data ranges (number of rows) and number of used columns can vary. The percent calculation is based on the values on another worksheet called Data.
Below is an example of the new worsheet named Percent:
I need just a simple linechart with all the series that are available in columns B through Y. I would like no markers, thin lines, a legend on the right, and the Y axis is on the right at the maximum date. Also a title, "Percent Returns" would be nice.
Could anyone on the board help with VBA code to create a chart as described above? Any help is appreciated.
Thanks,
Art
I want to compare the percent growth of various stocks that I am following. The percent calulation starts in column B, row 5 extending to column Y. Stock names are in row 4 starting in column B. Dates are in column A.
The data ranges (number of rows) and number of used columns can vary. The percent calculation is based on the values on another worksheet called Data.
Below is an example of the new worsheet named Percent:
Excel Workbook | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | |||
4 | Date | COH | FAST | TPX | UA | ASNA | ATHN | GCO | LULU | ULTA | VAL | ||
5 | 12/14/2011 | -0.9% | -0.2% | -1.8% | -0.7% | -0.6% | -3.1% | -1.2% | -2.7% | -4.8% | -1.1% | ||
6 | 12/15/2011 | -2.1% | 1.0% | -1.2% | -0.5% | -0.1% | -18.1% | -0.4% | 0.7% | -5.5% | -0.2% | ||
7 | 12/16/2011 | -4.1% | 2.6% | 2.6% | -0.5% | 3.1% | -17.6% | 0.2% | 1.0% | -5.1% | 1.0% | ||
8 | 12/19/2011 | -5.2% | 2.8% | -2.1% | -3.3% | 4.1% | -19.8% | 0.3% | 0.7% | -8.1% | 0.9% | ||
9 | 12/20/2011 | -2.4% | 7.1% | 0.6% | -2.9% | 9.0% | -17.3% | 5.2% | 4.4% | -5.2% | 3.2% | ||
10 | 12/21/2011 | -0.3% | 6.8% | 0.7% | -4.5% | 8.4% | -17.7% | 7.6% | 2.4% | -6.7% | 3.6% | ||
11 | 12/22/2011 | -0.5% | 6.2% | 5.8% | -5.2% | 6.9% | -18.0% | 6.9% | 4.4% | -9.1% | 5.7% | ||
12 | 12/23/2011 | 1.9% | 8.2% | 4.9% | -1.7% | 7.3% | -17.6% | 7.2% | 6.9% | -6.2% | 6.7% | ||
13 | 12/27/2011 | 2.8% | 8.7% | 3.2% | -1.0% | 8.7% | -17.8% | 8.9% | 8.5% | -7.2% | 5.9% | ||
14 | 12/28/2011 | 1.3% | 8.4% | 0.8% | -2.6% | 6.6% | -17.5% | 6.9% | 5.1% | -9.2% | 6.2% | ||
15 | 12/29/2011 | 2.5% | 9.8% | 4.8% | -3.5% | 8.7% | -16.3% | 8.1% | 5.0% | -8.4% | 7.7% | ||
16 | 12/30/2011 | 1.6% | 8.0% | 2.3% | -3.6% | 7.5% | -18.0% | 6.9% | 4.1% | -8.1% | 7.8% | ||
17 | 1/3/2012 | 0.0% | 8.4% | 7.5% | -3.1% | 8.5% | -16.4% | 1.5% | 5.0% | -9.2% | 8.5% | ||
18 | 1/4/2012 | 2.5% | 9.9% | 9.1% | -2.4% | 11.6% | -15.7% | 5.0% | 14.1% | -6.0% | 10.0% | ||
19 | 1/5/2012 | 3.0% | 11.8% | 13.4% | -1.7% | 17.9% | -11.9% | 9.3% | 16.3% | -1.5% | 10.4% | ||
20 | 1/6/2012 | 4.3% | 12.0% | 14.0% | -0.4% | 17.1% | -11.2% | 7.3% | 19.8% | -1.6% | 11.9% | ||
21 | 1/9/2012 | 4.7% | 11.9% | 13.1% | -0.1% | 20.8% | -9.6% | 7.3% | 19.3% | -1.0% | 10.7% | ||
22 | 1/10/2012 | 3.8% | 11.5% | 13.0% | 0.9% | 21.7% | -9.7% | 6.5% | 33.6% | -0.2% | 13.1% | ||
23 | 1/11/2012 | 1.6% | 12.0% | 16.0% | 1.7% | 21.6% | -8.0% | 6.4% | 35.2% | 1.6% | 13.6% | ||
24 | 1/12/2012 | 2.1% | 13.6% | 16.4% | 4.3% | 22.7% | -6.6% | 6.2% | 36.7% | 1.9% | 14.9% | ||
25 | 1/13/2012 | 3.3% | 15.4% | 14.8% | 3.6% | 23.4% | -9.6% | 2.5% | 38.3% | 3.6% | 15.8% | ||
26 | 1/17/2012 | 4.3% | 15.9% | 14.1% | 2.4% | 25.0% | -9.6% | 3.5% | 35.4% | 5.0% | 15.8% | ||
27 | 1/18/2012 | 7.5% | 12.8% | 18.0% | -1.7% | 27.6% | -3.6% | 3.4% | 35.0% | 7.3% | 17.0% | ||
28 | 1/19/2012 | 8.2% | 13.3% | 22.3% | -2.1% | 27.9% | -3.6% | 3.5% | 34.2% | 9.6% | 17.9% | ||
29 | 1/20/2012 | 8.0% | 13.6% | 19.2% | -1.2% | 28.2% | -4.8% | 3.3% | 34.2% | 8.0% | 16.5% | ||
30 | 1/23/2012 | 7.0% | 14.1% | 17.8% | 1.7% | 27.8% | -6.4% | 2.7% | 39.3% | 8.9% | 15.9% | ||
Percent |
I need just a simple linechart with all the series that are available in columns B through Y. I would like no markers, thin lines, a legend on the right, and the Y axis is on the right at the maximum date. Also a title, "Percent Returns" would be nice.
Could anyone on the board help with VBA code to create a chart as described above? Any help is appreciated.
Thanks,
Art