I want to be able to plot the data in the first 2 columns. Then, in vba, I want to be able to plot it again, but multiply the second column (x-axis) by negative 1. I do not want to have to create a new column in my sheet of these negative values, though.
<tbody>
</tbody>
Here is the code I have so far, but I have no idea how to do the second part:
With ActiveChart.SeriesCollection.Add
.Name = ActiveSheet.Range("B2")
.Values = ActiveSheet.Range("A2:A192")
.XValues = ActiveSheet.Range("B2:B192")
End With
'create negative x axis version (mirror it)
With ActiveChart.SeriesCollection.Add
.Name = ActiveSheet.Range("B2")
.Values = ActiveSheet.Range("A2:A192")
.XValues = -1*(ActiveSheet.Range(("B2:B192"))
End With
Y axis | X axis | ||||||||||||||||||||||||||||||||||||
<!--StartFragment--> <colgroup><col width="65" style="width:65pt"> </colgroup><tbody> <!--EndFragment--></tbody> |
<!--StartFragment--> <colgroup><col width="65" style="width:65pt"> </colgroup><tbody> <!--EndFragment--></tbody> |
<tbody>
</tbody>
Here is the code I have so far, but I have no idea how to do the second part:
With ActiveChart.SeriesCollection.Add
.Name = ActiveSheet.Range("B2")
.Values = ActiveSheet.Range("A2:A192")
.XValues = ActiveSheet.Range("B2:B192")
End With
'create negative x axis version (mirror it)
With ActiveChart.SeriesCollection.Add
.Name = ActiveSheet.Range("B2")
.Values = ActiveSheet.Range("A2:A192")
.XValues = -1*(ActiveSheet.Range(("B2:B192"))
End With