Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-04-2019, 06:04 AM
p45cal's Avatar
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: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
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, 9 views)
Reply With Quote
 



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

Other Forums: Access Forums

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


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