Hi,
Any chance that
should actually say
???
Stepping through the code, the first location is "London", but the first row that is being looked at is the header row (row 3). And changing the 3 to a 4 does get the code past this point.
Some other changes you will need to make:
1. In the "CreateCharts" subroutine, you will need to change GroupRange = to Set GroupRange =, and similarly for ValueRange = on the next line.
2. In the "AddChart" subroutine, you will have to add your series manually. The reason for this is because when using SetSourceData in your case, Excel is unable to recognise chartable data in the range that you have given it, so it creates the chart without an initial series. This also means the chart doesn't have any other features either... no plot area, no legend, and no placeholder for a title. So the code errors out when you try to set the title, because the title placeholder doesn't exist. You can change this by manually adding each series in VBA rather than trying to set the source data.
I hope this has helped
Bookmarks