+ Reply to Thread
Results 1 to 6 of 6

The number of a data point in a series

Hybrid View

dindea The number of a data point in... 10-16-2012, 09:20 AM
Andy Pope Re: The number of a data... 10-17-2012, 04:28 AM
dindea Re: The number of a data... 10-17-2012, 05:50 AM
dindea Re: The number of a data... 10-17-2012, 06:06 AM
dindea Re: The number of a data... 10-17-2012, 07:24 AM
dindea Re: The number of a data... 10-23-2012, 10:07 AM
  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    Hoganas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Smile Re: The number of a data point in a series

    (Andy,)

    ... Only that it should (certainly) be:
    Dim SelectedPoint as Point
    Dim SeiesAndPointnumber As String
    
    SelectedPoint = Selection
    SeiesAndPointnumber = SelectedPoint.DataLabel.Name
    You had missed '.DataLabel".
    'SeriesAndPointnumber' takes on a value like
    "Text S16P211".

    /dindea
    Extracting the point number as an Integer is "peanuts"...
    Last edited by dindea; 10-17-2012 at 06:08 AM. Reason: typo

  2. #2
    Registered User
    Join Date
    10-16-2012
    Location
    Hoganas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: The number of a data point in a series

    I "said too much".
    The approach with "SelectedPoint.DataLabel.Name" works only when the point has a data label (SelectedPoint.HasDataLabel = True).
    For a point without a data label (SelectedPoint.HasDataLabel = False) it does not work. "SelectedPoint.DataLabel.Name" results in the error "Unable to get the Name property ..."
    (and SelectedPoint.DataLabel.Name = <Unable to get the Name property ...>).
    So, how do I do it on a point without a data label?

    "SelectedPoint.Name" yields the error "Object variable or With block variable not set".

    /dindea
    Last edited by dindea; 10-17-2012 at 07:33 AM. Reason: additional info

  3. #3
    Registered User
    Join Date
    10-16-2012
    Location
    Hoganas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: The number of a data point in a series

    It turned out that the problem was Excel2003. It works in Excel2010. And it is possible to get the coordinates of a point in a series without "messing with" algebra.
    'SelectedPoint.Left' and 'SelectedPoint.Top' return the X and Y coordinates (N.B., the Y coordinate is counted from the top edge) of the point, in chart points.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1