Hi Guys!
I'm sorry for spamming but the last post was inaccurate for my problem!
So I have a fully functioning code:
Sub Test5()
With Sheets("Sheet4")
Set range1 = Range("sheet4!a:a")
Set range2 = Range("sheet4!b:b")
Set myrange = Union(range1, range2)
Charts.Add
With ActiveChart
.ChartType = xlLine
.SetSourceData Source:=myrange
.PlotBy = xlColumns
.Location Where:=xlLocationAsObject, Name:="Sheet4"
End With
End With
End Sub
This code creates a graph for me using input data from columns A and B. However I have a couple of questions/problems.
1) If you guys run it with some data, the graph comes out fine but some extra lines come out as well. My question is, how do you delete those? (It's like graphing column a twice)
2) How do I add axis labels on the graph? is there some extra coding I need to do?
Bookmarks