I have a spreadsheet with 4 columns of data. Date, Country, Population and Expected Population.

Example: Date is the same for 4 rows, countries, pop and exp population change each row. Then this is repeated for the next 4 rows for the next date and this is repeated for many days. Sample is below.

[TABLE="class: cms_table, width: 500"]

Date

[/td]Country

[/td]Population

[/td]Expected population

[/td]feb 23

[/td]Canada

[/td]50 mil

[/td]45

[/td]feb 23

[/td]USA

[/td]300 mil

[/td]290

[/td]feb 23

[/td]England

[/td]50 mil

[/td]60

[/td]feb 23

[/td]Jamaica

[/td]30 mil

[/td]25

[/td]feb 24

[/td]Canada

[/td]51 Mil

[/td]49

[/td]feb 24

[/td]USA

[/td]299 mil

[/td]305

[/td]feb 24

[/td]England

[/td]49 mil

[/td]50

[/td]feb 24

[/td]Jamaica

[/td]26 mil

[/td]25

[/td]

[/TABLE]

I want to make a chart for each country that has its different: dates, population and expected population, This would make things faster instead of filtering for each country(col b) then making a chart manually, how can I automate this and make a chart for each country?(there are many countries in my true data)

So the macro would filter to the below and make a chart, for each unique value in a specified column(this time being b), And then another chart would be made for USA, and so on.

[TABLE="class: cms_table, width: 500"]

Date

[/td]Country

[/td]Pop

[/td]Expected Pop

[/td]Feb 23

[/td]Canada

[/td]50 Mil

[/td]45

[/td]Feb 24

[/td]Canada

[/td]51 Mil

[/td]49

[/td]

[/TABLE]

Code:

`Sub Chart() ActiveSheet.ListObjects("Timings").Range.AutoFilter Field:=7, Criteria1:= _ "Canada" ActiveSheet.Shapes.AddChart.Select ActiveChart.ChartType = xlColumnClustered ActiveChart.SetSourceData Source:=Range("Data!$A$1:$AA$163")End Sub`

This is what i have so far, which does the one chart, but not sure if this will be dynamic enough to get multiple charts made of a filtered column of unique values I specify.

any help would be greatly appreciated.