This is the only way I know how to get the correct type of graph... it adjust itself to the data. I chose to do it in a copy sheet named WS
Sheets("WS").Select
rmax = Sheets("WS").Range("a" & Rows.Count).End(xlUp).Row
k = 14
Sheets("WS").Cells(11, 2) = Sheets("WS").Cells(13, 1)
For r = 14 To rmax
Sheets("ws").Cells(11, k) = Sheets("ws").Cells(r, 1)
For m = 2 To 13
Sheets("ws").Cells(13, k) = Sheets("ws").Cells(r, m)
Sheets("ws").Cells(12, k) = Sheets("ws").Cells(12, m)
k = k + 1
Next m
Next r
Set c = Worksheets("ws").Range("12:12").Find("", LookIn:=xlValues)
cl = c.Address
Rng = "$B$13:" & Mid(cl, 1, Len(cl) - 2) & "13"
Sheets("Gráfico2").Select
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).Values = "='ws'!" & Rng
Rng = "$B$11:" & Mid(cl, 1, Len(cl) - 2) & "11"
ActiveChart.SeriesCollection(1).XValues = "='ws'!" & Rng
ActiveChart.SeriesCollection(1).Name = "=""unemployment rate"""
End Sub
Bookmarks