Color-chart-columns-by-cell-color.xlsm
sample VBA Macro file file attached for reference
one more sample sheet attached with macro.in this sheet chart data color change by vertical & i want it will be change horizontally,can you modified this?
Good Morning All
Can any one help me on this issue?
Hi amartakale!
Maybe this is useful.
Sub ColorChartBarsbyCellColor1() Dim txt As String, i As Integer c = ActiveChart.SeriesCollection.Count For i = 1 To c txt = ActiveChart.SeriesCollection(i).Formula arr = Split(txt, ",") With ActiveChart.Legend.LegendEntries(i) Set vaddress = ActiveSheet.Range(arr(2)) .LegendKey.Interior.Color = vaddress.Cells(1).Interior.Color End With Next i End Sub
Actually I take exception to the poor communication attached to this particular thread. Whilst the thread title suggests something, its the very lack of a detailed explanation, which sums up why most people will simply bypass this thread.
Take the time to clearly set out the issue. Describe what it is that you think you need as a end result for the issue and then you will find other wanting to assist.
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
Thanks Sir,sorry for late reply.Next time I take care for complicated Question.
Above code is perfect for Bar Chart (if horizontal data) then perfect work for color.
but there are different type of chart in my work how to modified this code to all Chart (Bar Chart,Pie Chart,Line Chart....also Data are Horizontal & Vertical way).If I change data color without heading then Chart color change by VBA automatically ,how it can possible?
Thanks once again
Really? How about telling the people what you think the issue is, what you would like as a result? Then we can decide what assistance we might be able to offer. Any other request such as post @8 is rude. Please think clearly about the fact you are posting to a world wide audience therefore what you might post to another person in India wont work here.
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
You can judge chart types for different processing.
The appendix is a simple example.