Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
Francois
 
Posts: n/a
Default Find the value of a point with VBA

Hi all,

Pardon my english ! I'm french.

I need to find the values of points of a serie (in charts of course)
with VBA. I can't refer to the value of the source cells because of the
very bad organization of the source sheets.

The only way I found is to add datalabels, pick the datalabels values,
convert them to numeric values.

Is there a shorter method to do that ? (XL2K)

I did not find the answer on the french speaking excel newsgroup though
it's very active and frendly.

Thanks

--
François L
  #2   Report Post  
Posted to microsoft.public.excel.charting
Andy Pope
 
Posts: n/a
Default Find the value of a point with VBA

Hi,

This will get the values from series 1. Note that linked cells with
errors or #N/A will not return a value.

Sub X()
Dim lngIndex As Long

On Error Resume Next
With ActiveChart.SeriesCollection(1)
For lngIndex = 1 To .Points.Count
Debug.Print "Series 1 Point "; lngIndex, _
Application.WorksheetFunction.Index(.Values, lngIndex)
Next
End With

End Sub

Cheers
Andy

Francois wrote:
Hi all,

Pardon my english ! I'm french.

I need to find the values of points of a serie (in charts of course)
with VBA. I can't refer to the value of the source cells because of the
very bad organization of the source sheets.

The only way I found is to add datalabels, pick the datalabels values,
convert them to numeric values.

Is there a shorter method to do that ? (XL2K)

I did not find the answer on the french speaking excel newsgroup though
it's very active and frendly.

Thanks


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.charting
Francois
 
Posts: n/a
Default Find the value of a point with VBA

Andy Pope a écrit :
Hi,

This will get the values from series 1. Note that linked cells with
errors or #N/A will not return a value.

(...)


Hi,

Thanks a lot. I'll test it as soon as possible. I'm busy with a son of
mine just now !

--
François L
  #4   Report Post  
Posted to microsoft.public.excel.charting
Francois
 
Posts: n/a
Default Find the value of a point with VBA

Andy Pope a écrit :
Hi,

This will get the values from series 1. Note that linked cells with
errors or #N/A will not return a value.

Sub X()
Dim lngIndex As Long

On Error Resume Next
With ActiveChart.SeriesCollection(1)
For lngIndex = 1 To .Points.Count
Debug.Print "Series 1 Point "; lngIndex, _
Application.WorksheetFunction.Index(.Values, lngIndex)
Next
End With

End Sub


Hi,

I tested it and it works exactly as I need. Thanks again.

--
François L
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Replace blakrapter Excel Worksheet Functions 3 December 15th 05 12:25 AM
Code needed to find records from bottom up Andy Excel Discussion (Misc queries) 4 December 5th 05 03:27 AM
Trapping a NO FIND after a find Alan Excel Discussion (Misc queries) 2 August 31st 05 01:28 PM
Find last occurance of text in range farutherford Excel Worksheet Functions 5 August 30th 05 02:00 AM
Find & Replace in VB macro JackC Excel Discussion (Misc queries) 1 August 24th 05 09:22 PM


All times are GMT +1. The time now is 05:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"