View Single Post
 
Old 03-04-2019, 06:04 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2016
Expert
 
Join Date: Apr 2014
Posts: 871
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, 7 views)
Reply With Quote