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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Series Values in an Excel Graph 1

Status
Not open for further replies.

JohnAcc

Technical User
Aug 13, 2003
143
GB
Hi There,

Does anyone know how i would retrieve the values of each series point in a graph and populate a seperate worksheet with them.

Any help would be appreciated.

Rgds

John
 
Hi,

Within each series is a points collection. Sou you could code something like this...
Code:
for each ser in activechart
  for each pt in ser.points
    'here's the  stuff for each point

  next
next
Hope this helps :)

Skip,
Skip@TheOfficeExperts.com
 
Hi Skip,

I can activate each series and each point within the graph but i can't seem to return the value of each point.

Any ideas ?
 
John,

Actually, your values are in the series...
Code:
Sub GetPoints()
    For Each ser In ActiveSheet.ChartObjects(1).Chart.SeriesCollection
      For Each yVal In ser.Values
        MsgBox yVal
      Next
       For Each xVal In ser.XValues
        MsgBox xVal
      Next
   Next
End Sub
:)

Skip,
Skip@TheOfficeExperts.com
 
Cheers Skip,

Your wisdom never ceases to amaze me! A star for you

Rgds

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top