Microsoft Office Forums Conditional format axis in a graph

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2019, 04:37 PM
JoemanNville JoemanNville is offline Conditional format axis in a graph Windows 10 Conditional format axis in a graph Office 2013
Novice
Conditional format axis in a graph
 
Join Date: Feb 2019
Posts: 11
JoemanNville is on a distinguished road
Default 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.
Attached Files
File Type: xlsx DDashboard.xlsx (352.6 KB, 2 views)
Reply With Quote
  #2  
Old 03-04-2019, 06:04 AM
p45cal p45cal is offline Conditional format axis in a graph Windows 10 Conditional format axis in a graph Office 2016
Expert
 
Join Date: Apr 2014
Posts: 282
p45cal has a spectacular aura aboutp45cal has a spectacular aura aboutp45cal has a spectacular aura about
Default

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
Attached Files
File Type: xlsm msofficeforums41840DDashboard.xlsm (362.5 KB, 1 views)
Reply With Quote
  #3  
Old 03-04-2019, 03:33 PM
JoemanNville JoemanNville is offline Conditional format axis in a graph Windows 10 Conditional format axis in a graph Office 2013
Novice
Conditional format axis in a graph
 
Join Date: Feb 2019
Posts: 11
JoemanNville is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 03-05-2019, 05:15 AM
p45cal p45cal is offline Conditional format axis in a graph Windows 10 Conditional format axis in a graph Office 2016
Expert
 
Join Date: Apr 2014
Posts: 282
p45cal has a spectacular aura aboutp45cal has a spectacular aura aboutp45cal has a spectacular aura about
Default

Quote:
Originally Posted by JoemanNville View Post
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.
Depends if they're charts based on the same pivot table.
Reply With Quote
  #5  
Old 03-06-2019, 03:25 PM
JoemanNville JoemanNville is offline Conditional format axis in a graph Windows 10 Conditional format axis in a graph Office 2013
Novice
Conditional format axis in a graph
 
Join Date: Feb 2019
Posts: 11
JoemanNville is on a distinguished road
Default

Yes on this dashboard. I do need some charts made up in my Batting Dashboard, how would that work?
Reply With Quote
  #6  
Old 03-06-2019, 04:10 PM
p45cal p45cal is offline Conditional format axis in a graph Windows 10 Conditional format axis in a graph Office 2016
Expert
 
Join Date: Apr 2014
Posts: 282
p45cal has a spectacular aura aboutp45cal has a spectacular aura aboutp45cal has a spectacular aura about
Default

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.
Reply With Quote
  #7  
Old 03-06-2019, 05:08 PM
JoemanNville JoemanNville is offline Conditional format axis in a graph Windows 10 Conditional format axis in a graph Office 2013
Novice
Conditional format axis in a graph
 
Join Date: Feb 2019
Posts: 11
JoemanNville is on a distinguished road
Default

Thanks so much for your help on my project for my class
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format axis in a graph 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
Conditional format axis in a graph 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


All times are GMT -7. The time now is 08:28 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft