VBA Advanced Charting - Is This Possible?

reneresendez

New Member
Joined
Jun 27, 2002
Messages
43
I am asked to chart data that always is different and I spend alot of time coping the data to another sheet for format it properly to chart, this is because of how the data comes in from the database source. How can I use VBA to move the data to another sheet to create dropdowns and format for charting.

Here is some VBA that I am trying with no luck.

Sub Test()
Dim rng As Range
Dim X As Long
Dim Y As Long
Dim I As Long
Dim arr

X=Range("A2")=4
Y=Range("A3")

Set rng=Range("B2")
For I=1 to Y
arr = Split(rng, " ")
rng.Offset(I*X)=arr(0)&" "&arr(1)+I
Next I

Columms ("B:B").SpecialCells(xlCellTypeConstants,3).Copy
Sheets("Sheets2").Range("A1").PastSpecial
Paste:=xlAll, SkipBlanks:=True

Data Page Below:
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

reneresendez

New Member
Joined
Jun 27, 2002
Messages
43
Data Page for Question
Mr Excel File.xls
ABCDEF
1DATAPAGE
22ACCOUNTA
33PRODUCT1
43BaseSalesIncrementalSalesNotes
51-Jan-06$51,352$1,530A2=#ofAccounts
68-Jan-06$65,483$3,562A3=#ofDataWeeks
715-Jan-06$70,156$153A4=#ofProducts
8
9PRODUCT2UserFormwillbeusedforA2,A3,A4
10BaseSalesIncrementalSales
111-Jan-06$0$0
128-Jan-06$65$6
1315-Jan-06$4,789$1,569
14
15PRODUCT3
16BaseSalesIncrementalSales
171-Jan-06$23$0
188-Jan-06$8,973$1,478
1915-Jan-06$101,253$2,456
20
21ACCOUNTB
22PRODUCT1
23BaseSalesIncrementalSales
241-Jan-06$158$58
258-Jan-06$158$36
2615-Jan-06$204$100
27
28PRODUCT2
29BaseSalesIncrementalSales
301-Jan-06$0$0
318-Jan-06$0$0
3215-Jan-06$0$0
33
34PRODUCT3
35BaseSalesIncrementalSales
361-Jan-06$99$2
378-Jan-06$876$186
3815-Jan-06$287$177
Data Page
 

Forum statistics

Threads
1,136,926
Messages
5,678,616
Members
419,776
Latest member
mikelowski

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top