Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
I want to have the same color in all four of my line charts per series. All
charts have the same series name. Is there some type of VBA code that I can run a macro to achieve this ? example: boat = green line mnotorcycle = yellow line auto = red line |
#2
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
You could avoid VBA, maybe, by choosing Tools, Options, Color and setting the first three colors of the Chart fills aor Chart lines area depending on the type of charts you are using. -- If this helps, please click the Yes button Cheers, Shane Devenshire "Jennifer" wrote: I want to have the same color in all four of my line charts per series. All charts have the same series name. Is there some type of VBA code that I can run a macro to achieve this ? example: boat = green line mnotorcycle = yellow line auto = red line |
#3
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
This will not work I have about 7 series in each chart. I have a macro for
Pie Charts I use to color code the slices according to the label, but this does not work for the line charts. "Jennifer" wrote: I want to have the same color in all four of my line charts per series. All charts have the same series name. Is there some type of VBA code that I can run a macro to achieve this ? example: boat = green line mnotorcycle = yellow line auto = red line |
#4
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
This is the code I am using to try and consistently color each series in the
four charts I have. Sub ColorBySeriesName() Dim rPatterns As Range Dim iSeries As Long Dim rSeries As Range Set rPatterns = ActiveSheet.Range("A1:A10") With ActiveChart For iSeries = 1 To .SeriesCollection.Count Set rSeries = rPatterns.Find(What:=.SeriesCollection(iSeries).Na me) If Not rSeries Is Nothing Then .SeriesCollection(iSeries).Interior.ColorIndex = _ rSeries.Interior.ColorIndex End If Next End With End Sub I obtain this from Jon Peltier website. The code stops at .SeriesCollection(iSeries).Interior.ColorIndex = _ rSeries.Interior.ColorIndex I cannot determine why. All series are identified in a1:a10 and identical to the series names in my chart data. Any siggestions? "Shane Devenshire" wrote: Hi, You could avoid VBA, maybe, by choosing Tools, Options, Color and setting the first three colors of the Chart fills aor Chart lines area depending on the type of charts you are using. -- If this helps, please click the Yes button Cheers, Shane Devenshire "Jennifer" wrote: I want to have the same color in all four of my line charts per series. All charts have the same series name. Is there some type of VBA code that I can run a macro to achieve this ? example: boat = green line mnotorcycle = yellow line auto = red line |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Range Names in Charts | Charts and Charting in Excel | |||
Charts based on 'virtual' names | Charts and Charting in Excel | |||
How do I use excel names with INDIRECT with charts | Charts and Charting in Excel | |||
Assign charts names in VBA? | Excel Discussion (Misc queries) | |||
Range Names with Charts | Charts and Charting in Excel |