Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88854

Making two or more charts on excel vba

$
0
0

I am trying to plot a exam sheet of the students in excel. A target line that shows the maximum you can get in a test and all along. Then what a student have achieved in each of the questions. The image may look like the following. The bar graph shows how much a student scored in a test. With the two colors blue and orange representation scores in the two respective sections. His performance is plotted for the whole year. The dotted line graph represents the target of the students that they can reach if they score maximum.

I use the following code function to draw one chart but when I try to include the second one, it overwrites the first one. 1 2 3 4 5 6 7 8

Sub CreateEmbeddedChartUsingShapesAddChart()
 Dim embeddedchart As Shape
 Set embeddedchart = Sheets("Sheet1").Shapes.AddChart
 embeddedchart.Chart.SetSourceData Source:=Sheets("Sheet1").Range("A1:B4") 
End Sub

Viewing all articles
Browse latest Browse all 88854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>