Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Morning All,
The following function is used to loop through all line charts on each sheet of a report. I was hoping that when is finds any negative points it would colour in that point on the chart red - it does work nu the points are coloured black .....any help appreciated. Regards Jason. '============================================= Public Function FormatGraph(myWorksheet As String) Sheets(myWorksheet).Select Dim myChartObject As ChartObject For Each myChartObject In Sheets("Daily Results").ChartObjects myChartObject.Select Dim myPoint As Integer, valArray With ActiveChart.SeriesCollection(1) valArray = .Values For myPoint = 1 To .Points.Count Select Case valArray(myPoint) Case Is 0 With .Points(myPoint) .Interior.ColorIndex = xlAutomatic End With Case Is = 0 With .Points(myPoint) .Interior.ColorIndex = xlAutomatic End With Case Is < 0 With .Points(myPoint) .Interior.ColorIndex = 25 .Interior.Pattern = xlSolid End With End Select Next End With Next myChartObject Cells(1, 1).Select End Function 'FormatGraph '============================================= |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
aligning by decimal point - negative and positive numbers | Excel Discussion (Misc queries) | |||
Addition of error bars creates black filled in areas on chart in 2 | Charts and Charting in Excel | |||
Series Lines are Not Visible in a Black Chart | Charts and Charting in Excel | |||
Black box when printing embedded chart to XPS | Charts and Charting in Excel | |||
How do I change all chart colors to black and white? | Charts and Charting in Excel |