hi everyone,
i am looking for a code which can be used to change the color of a series in a pivot chart based on it value.like if series value is greater than 60 - green,between 50 - 60,yellow and less than 50 red.
please help.
macro to change series color in a pivot chart based on its value
-
-
-
Re: macro to change series color in a pivot chart based on its value
Hi sudarshan.kmr,
Nice to meet you.Code
Display MoreDim varSrsValue Dim cnt As Integer Dim EmntSrsValue varSrsValue=ActiveChart.SeriesCollection(1).Values For Each EmntSrsValue In varSrsValue cnt = cnt + 1 With ActiveChart.SeriesCollection(1).Points(Cnt) Select Case EmntSrsValue Case Is > 60 .Interior.Color = vbGreen Case Is > 50 .Interior.Color = vbYellow Case Is < 50 .Interior.Color = vbRed Case Else End Select End With Next
http://www.cellmatrix.net/index.php/exce…_bars_version_1
Regards, junho -
Re: macro to change series color in a pivot chart based on its value
it really worked.thanks a ton
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!