I'm trying to follow along this tutorial:
http://www.homeandlearn.org/vba_charts_sheets.html
Here is as far as I've gotten:
Sub MakeChart()
Dim ChartSheet1 As Chart
Set ChartSheet1 = Charts.Add
With ChartSheet1
.SetSourceData Source:=Sheets("clc_hgn_hgn").Range("C3:AO41")
End With
End Sub
The problem is that Excel automatically assumes the column and row headers are in the data source, when in my worksheet they are not. How do I get Excel to retrieve the headers from different ranges?
For instance, in my worksheet the data is contained in the range C3:AO41, but the horizontal top headers are in C1:AO1 and the vertical left headers are in A3:A41.