Hi @all,
I've one excelsheet with 2 tables. Table 1 is called "Auswertung" and should only showing the chart. Table 2 is called "Tabelle2" and includes the Range("A1:B23"). In A there are several categories and B is counting how often the categories are found in another excelsheet
. The following macro is creating one chart for me:
Sub Diagramm()
Dim ch As ChartObject
Set ch = ActiveSheet.ChartObjects.Add(Cells(7, 2).Left, Cells(7, 2).Top, 400, 250)
With ch.Chart
.ChartType = xlColumnClustered
.SetSourceData Source:=Sheets("Tabelle2").Range("A1:B23"), PlotBy:=xlColumns
.HasLegend = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
.HasTitle = False
End With
End Sub
The columns in this charts have the same color, but I want different colors if the value of "B" is bigger than 2. So how would it look then?
Thx@all
Bookmarks