Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]() Hi, I have a graph containing a variable amount of series with Border.ColorIndex=xlAutomatic. I would like the colorindex of the 4th series to be the same as the first series, the colorindex of the 5th series to be the same as the second series, the colorindex of the 6th series to be the same as the third series, the colorindex of the 7th series to be the same as the first series, the colorindex of the 8th series to be the same as the second series, and so on. The periodicity of the colorindex varies, I mean, it varies how many colors that shall be used. How to do this in VBA code? I have tried this Code: -------------------- For i = 1 To numOfSeries For j = 1 To numOfDifferentColors If i numOfDifferentColors Then ActiveChart.SeriesCollection(numOfDifferentColors * (i - 1) + j).Select With Selection.Border .ColorIndex = ActiveChart.SeriesCollection(j).Border.ColorIndex End With With Selection .MarkerBackgroundColorIndex = ActiveChart.SeriesCollection(j).MarkerBackgroundCo lorIndex .MarkerForegroundColorIndex = ActiveChart.SeriesCollection(j).MarkerForegroundCo lorIndex .MarkerStyle = ActiveChart.SeriesCollection(j).MarkerStyle End With End If Next Next -------------------- but since the colorIndex is xlAutomatic for the first series, all series only gets the xlAutomatic colorindex setting... Any ideas?? Regards, Siri -- SiriS ------------------------------------------------------------------------ SiriS's Profile: http://www.excelforum.com/member.php...fo&userid=7995 View this thread: http://www.excelforum.com/showthread...hreadid=521686 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I change the settings on the row headers/ | Excel Worksheet Functions | |||
How do I change default number settings? | Excel Worksheet Functions | |||
Can you change the settings for an Import Wizard | Setting up and Configuration of Excel | |||
How do I change the default settings in charts? | Charts and Charting in Excel |