Issue
I have an excel sheet with 5 columns in it. I want to use a VBScript to graph data only from columns A, D, and E.
Currently, using the code below, I am getting all 5 columns graphed. Please advise and thanks in advance.
With .ActiveChart
.SetSourceData(Source:=objXLSWorkSheet.Range("A:A" & LastRowofA, "D:D" & LastRowOfD, "E:E" & LastRowOfE))
End With
Solution
Try to use Union
method to create the necessary range:
With .ActiveChart
.SetSourceData .Application.Union(objXLSWorkSheet.Range("A1:A" & LastRowofA), objXLSWorkSheet.Range("D1:D" & LastRowOfD), objXLSWorkSheet.Range("E1:E" & LastRowOfE))
End With
Answered By - omegastripes Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.