Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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
Any hints/tips appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
add individual data points to a bar chart of averages lenos Charts and Charting in Excel 3 April 3rd 23 04:37 PM
XY Scatter Chart - Drag individual data points on graph Darril Charts and Charting in Excel 8 May 20th 09 03:02 PM
XY Scatter Chart - Drag individual data points on graph DOV Excel Discussion (Misc queries) 1 May 1st 09 11:19 PM
Change color of individual hiloline points in a series Ian Charts and Charting in Excel 1 March 5th 06 09:40 PM
Naming of individual points in chart Eirik Excel Programming 0 October 21st 04 11:45 AM


All times are GMT +1. The time now is 01:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"