Anda di halaman 1dari 8

This workbook contains VBA code that uses the ChartSeries class module

The ChartSeries class module makes it easy to work with chart data using VBA. The class module may be exported and then imported into any project. Click the sheet tabs to access the demos, press Alt+F11 to view the code. l Demo1: VBA code is in the code module for the Demo1 sheet l Demo2: VBA code is in the code module for the Demo2 sheet l Demo3: VBA code is in the code module for the Demo3 sheet l Demo4: VBA code is in Module1 Developed by John Walkenbach, JWALK AND ASSOCIATES
1999. All rights reserved. May be used and distributed freely, but may not be sold.

http://www.j-walk.com/ss/

Month Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

Last Yr 183 109 144 162 120 172 194 119 128 174 195 157

This Yr 144 132 155 200 232 255 301 277 322

350 300 250 200 150 100 50 0 Jan Feb Mar Apr May Jun Jul Aug Sep
Last Yr This Yr

Series Name Values

XValues Plot Order

j Last Year k l m n
i This Year j k l m n

Sep

Oct

Nov

Dec

Year
Year

Month Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb

Sales 43 55 64 54 78 69 75 72 81 92 84 102 104 90 70 60 50 40 30 20 10 0 Jan Feb Mar

Fewer Months

More Months

Mar

Label Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 Data 7 Data 8 Data 9 Data 10 Data 11 Data 12 Data 13 Data 14 Data 15 Data 16 Data 17 Data 18 Data 19 Data 20 Data 21 Data 22 Data 23 Data 24 Data 25 Data 26

Data 183 109 144 162 120 172 194 119 128 174 195 157 109 149 194 183 177 160 159 163 185 121 121 114 107 128

250 200 150 100 50 0


Data 4 Data 5 Data 6 Data 7 Data 8 Data 9 Data 10 Data 11

Select cells in column B. Then click here.

Data 11

Data 12

A Chart That Uses Arrays


1200

1000

800

600

400
200 0 Jan
1st Quarter Sales

Feb

Mar

Apr

Anda mungkin juga menyukai