• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Color chart

By VBA only I think. One way; this macro is run when you click the button at cell Z3:
Code:
Sub blah()
Set myPoints = Sheets("v.B KW CP").ChartObjects("Graf 1").Chart.FullSeriesCollection(1).Points
For i = 2 To myPoints.Count
  With myPoints(i).Format.Line
    If myPoints(i).Top > myPoints(i - 1).Top Then
      .ForeColor.RGB = RGB(255, 0, 0)
    Else
      .ForeColor.RGB = RGB(0, 112, 192)
    End If
  End With
Next i
End Sub

See https://peltiertech.com/conditional-formatting-of-lines-in-an-excel-line-chart-using-vba/
 

Attachments

Last edited:
kyjak555
It can do without VBA too,
as shown in above link.​
Here a sample.

If You can get some nice formulas
- then those could get it with five series ( black bordered range ).
 

Attachments

kyjak555
Lines will display after You have chosen Line from No line to Solid line
Screenshot 2022-06-27 at 17.42.46.png Screenshot 2022-06-27 at 17.42.53.png
Your original sample has less data and
Your newer sample has more data.
... then it could do this way too.
 

Attachments

Back
Top