das Diagramm so in der Art wie ein Levelmeter ist mit Excel erstellt, leider
habe ich keinen Ansatz wie das erstellt wurde. Bitte um Ideen.
mfg Fred
Option Explicit
'ins Tabellenmodul
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [b1:b14,e1:e14,h1:h14,k1:k14,n1:n14,q1:q14,t1:b14,w1:w14,z1:z14,ac1:ac14]) _
Is Nothing Then Exit Sub
Balken_färben
End Sub
'in ein Standardmodul
Public Sub Balken_färben()
Dim i%, dr%, p%, s%
s = 2
Application.ScreenUpdating = False
With ActiveSheet
With .ChartObjects(1).Chart
dr = .SeriesCollection.Count
For i = 1 To dr
With .SeriesCollection(i)
For p = 1 To .Points.Count
With .Points(p).Fill
.TwoColorGradient _
Style:=msoGradientHorizontal, _
Variant:=3
.Visible = True
Select Case Cells(p, s)
Case "b"
.ForeColor.SchemeColor = 11
.BackColor.SchemeColor = 5
Case "r"
.ForeColor.SchemeColor = 9
.BackColor.SchemeColor = 3
Case "o"
.ForeColor.SchemeColor = 16
.BackColor.SchemeColor = 44
Case ""
.ForeColor.SchemeColor = 1
.BackColor.SchemeColor = 1
End Select
End With
Next
s = s + 3
End With
i = i + 1
Next
End With
End With
Application.ScreenUpdating = True
End Sub