Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change pattern for individual data points on chart
Using a standard column chart, I would like to change the pattern for a given
data point if it's reference cell contains the text "Fail". The code I've got thus far will change the first point that Fails the first time the macro is run. It won't change other points that Fail, and if I change the pattern manually and run the code again, it will only select the first data point that Fails, but not change the pattern. Code follows: Code:
Private Sub Stripe() Dim objCht As ChartObject Dim i As Integer Dim rngCnt As Range Dim rngCell As Range With Sheets(1) Set rngCnt = .Range(.Range("E2"), .Range("E65536").End(xlUp)) i = 1 For Each rngCell In rngCnt If rngCell.Offset(, 1) = "Fail" Then ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.SeriesCollection(1).Points(i).Select Selection.Fill.Patterned Pattern:=msoPatternWideUpwardDiagonal End If i = i + 1 Next rngCell End With End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change pattern for individual data points on chart
Okay, so I'm silly. Well actually my Citrix client is silly. The below code DOES work as expected; just I had a hanging Excel instance that was munging up the works. Thanks, all. Now on to the next issue... *laughter* |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add individual data points to a bar chart of averages | Charts and Charting in Excel | |||
XY Scatter Chart - Drag individual data points on graph | Charts and Charting in Excel | |||
XY Scatter Chart - Drag individual data points on graph | Excel Discussion (Misc queries) | |||
Change color of individual hiloline points in a series | Charts and Charting in Excel | |||
Naming of individual points in chart | Excel Programming |