Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing marker style of a data series 2

Status
Not open for further replies.

bojzon

IS-IT--Management
Sep 18, 2003
25
SI
Is it possible (in MS excel graph) to change the line color or the marker style of a data series IN THE "MIDLE" OF DATA?
EX.: data series include DATA UP TO NOW (DATA FROM DATABASE) AN REST (PROJECTION) TO THE END OF YEAR?
Need "projection" with different marker or color.

Thanks
Bojzon
 
Yup - you need to use the POINTS collection of the SERIES object. The following code changes the colour of the line and marker on point 11 to red. It also sets the marker to a triangle:
Code:
With ActiveChart.SeriesCollection(1).Points(11)
    .Border.ColorIndex = 3
    .MarkerBackgroundColorIndex = 3
    .MarkerForegroundColorIndex = 3
    .MarkerStyle = xlTriangle
End with

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 




Hi,

Another option
Code:
dim pt as point, i as integer
with ActiveChart.SeriesCollection(1)
  for i = 1 to .points.count 
    with .points(i)
       select case i
          case 1 to .points.count / 2
          case else
           .Border.ColorIndex = 3
           .MarkerBackgroundColorIndex = 3
           .MarkerForegroundColorIndex = 3
           .MarkerStyle = xlTriangle
       end select
    end with
  next
end with
changes the marker of the last half of the points.

Skip,

[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top