Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Graphs
I am currently working on a bar graph and in this graph I want it to find if
a value is over 50 then show one of the bars red. Is there a macro out there that will enable the graph to such function? If so what is it? Thank you Doug |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Graphs
This is an illustration of how this could be done. It will need to be adapted
to suit your graph. In this case there is only one graph on the sheet ("Chart 1"). The macro checks the data used to create series one on the graph - this is held in the range ("B2:F2"). Sub ChngColour() Dim dRng As Range Dim Cell As Range With Sheets("Sheet1") Set dRng = .Range("B2:F2") For Each Cell In dRng If Cell.Value = 50 Then .ChartObjects("Chart 1").Activate With ActiveChart .SeriesCollection(1). _ Points(Cell.Column - 1). _ Interior.ColorIndex = 3 End With End If Next Cell End With Range("A1").Select End Sub Hope this helps Rowan "Douglas Voltin" wrote: I am currently working on a bar graph and in this graph I want it to find if a value is over 50 then show one of the bars red. Is there a macro out there that will enable the graph to such function? If so what is it? Thank you Doug |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Graphs
Doug -
Here's a non-VBA approach: http://peltiertech.com/Excel/Charts/...nalChart1.html - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Douglas Voltin wrote: I am currently working on a bar graph and in this graph I want it to find if a value is over 50 then show one of the bars red. Is there a macro out there that will enable the graph to such function? If so what is it? Thank you Doug |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Graphs | Excel Discussion (Misc queries) | |||
Graphs and VBA | Excel Discussion (Misc queries) | |||
Are there better GRAPHS within EXCEL or Add-on graphs? | Charts and Charting in Excel | |||
Automatic Graphs/ Dynamic Graphs | Charts and Charting in Excel | |||
Line Graphs and Bar Graphs | Excel Discussion (Misc queries) |