I want to graph the result of my table in excel. here is the code that I have :
Sub bow()
'
' bow Macro
'
'
Worksheets("Sheet3").Select
tahX = Cells(3, 3).Value + 2
Xval = Offset(A1, 1, 2, 1, 1)
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("'Sheet3'!$12:$12,'Sheet3'!$10:$10")
ActiveChart.ChartType = xlXYScatter
ActiveChart.SeriesCollection(1).Name = "=""bowe"""
ActiveChart.SeriesCollection(1).XValues = "='Sheet3'!$12:$12"
ActiveChart.SeriesCollection(1).Values = "='Sheet3'!$10:$10"
End Sub
now I want to limit the X-values to the value that is defined in the cell C3. So for example if C3 = 20, I want it to only use the first 20 values in the row number 12. How can I do that ?