#1
|
|||
|
|||
Conditional format axis in a graph
Hi Office,
I have a graph in my Pitcher Dash tab that I would like to conditional format when that player is chosen. For example, If I select Zimmermann from A3 drop down list, I would like to have Zimmermann colored or highlighted in the graph, just the name. Am I able to do that? Thanks for your input... Joe, Michigan. |
#2
|
||||
|
||||
I can't make the name change colour but I can make the appropriate bar on the chart change colour. Test the attached which has this macro:
Code:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$3" Then Set cht = ChartObjects("Chart 3").Chart Set pt = cht.PivotLayout.PivotTable x = Application.Match(Target.Value, pt.PivotFields("Last").DataRange, 0) With cht .FullSeriesCollection(1).Format.Fill.ForeColor.RGB = RGB(91, 155, 213) If Not IsError(x) Then .FullSeriesCollection(1).Points(Application.Match(Target.Value, pt.PivotFields("Last").DataRange, 0)).Format.Fill.ForeColor.RGB = RGB(197, 90, 17) End With End If End Sub |
#3
|
|||
|
|||
Hi P45 Cal,
That will work for me. I want to probably add a few more charts, do I use the same code for the others? Thanks for you help, I appreciate the input. |
#4
|
||||
|
||||
Depends if they're charts based on the same pivot table.
|
#5
|
|||
|
|||
Yes on this dashboard. I do need some charts made up in my Batting Dashboard, how would that work?
|
#6
|
||||
|
||||
Probably best to set up the charts in a workbook,tell us which cell(s) have the dropdown(s) you want the charts to respond to and attach that workbook here. Otherwise it will be down to you to examine the existing code and tweak it.
|
#7
|
|||
|
|||
Thanks so much for your help on my project for my class
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I edit the axis labels in this graph? | dionv | Drawing and Graphics | 3 | 07-19-2018 11:45 PM |
Graph - Need a second X axis on the Top of Graph | paulzy95 | Excel | 6 | 10-09-2016 12:07 PM |
column clustered bar graph with a line graph as secondary axis | Alaska1 | Excel | 2 | 06-09-2014 07:13 PM |
Triple Axis Line Graph | sschultz0956 | Excel | 1 | 09-28-2010 12:39 PM |
how do I add data values in Col A into X axis on bar graph? | hazz | Excel | 1 | 04-27-2010 01:42 PM |