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:
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: