Далее отредактировал мой ответ. все еще работает в Excel 2007, пожалуйста, измените его в соответствии с вашими требованиями.
Sub test()
Dim myString As String
myString = Selection.Address
Dim Rng, RngX, RngMet, RngPop As Range, popRow, MetRow As Long
With ActiveSheet
Set Rng = .Range(myString)
Set RngX = .Range(Rng.Cells(1, 2), Rng.Cells(1, Rng.Columns.Count))
MetRow = 2
popRow = 3
If InStr(1, UCase(Rng.Cells(2, 1).Value), "POP") > 0 Then
MetRow = 3
popRow = 2
End If
Set RngPop = .Range(Rng.Cells(popRow, 2), Rng.Cells(popRow, Rng.Columns.Count))
Set RngMet = .Range(Rng.Cells(MetRow, 2), Rng.Cells(MetRow, Rng.Columns.Count))
.Shapes.AddChart(201, xlColumnClustered).Select
'ActiveChart.SetSourceData Source:=Range(myString)
'ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Values = RngMet
'ActiveChart.SeriesCollection(1).ChartType = xlColumnClustered
ActiveChart.SeriesCollection(1).AxisGroup = 1
ActiveChart.SeriesCollection(1).ChartType = xlLineMarkers
ActiveChart.SeriesCollection(1).Name = Rng.Cells(MetRow, 1).Value
'ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = RngPop
ActiveChart.SeriesCollection(2).ChartType = xlLineMarkers
ActiveChart.SeriesCollection(2).ChartType = xlArea
ActiveChart.SeriesCollection(2).AxisGroup = 2
ActiveChart.SeriesCollection(2).Name = Rng.Cells(popRow, 1).Value
ActiveChart.SeriesCollection(1).XValues = RngX
ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = 2
ActiveChart.Axes(xlCategory, xlPrimary).TickLabels.NumberFormat = "MMM-yy"
ActiveChart.Axes(xlCategory, xlPrimary).HasTitle = True
ActiveChart.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = Rng.Cells(1, 1).Value
End With
End Sub