+ Reply to Thread
Results 1 to 18 of 18

Using GET.CHART.ITEM on data points in Excel 2003

  1. #1
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Question Using GET.CHART.ITEM on data points in Excel 2003

    Hello all. I just spent the past two days creating a monumental macro to make plotting easier only to have it crash when I moved the code to Excel 2003. I have pinpointed the issue, though:

    In Excel 2007, I use the following line to get the coordinate (on the chart area) of a data point that I later use to make an arrow pointing at it:

    Please Login or Register  to view this content.
    So if 'start' is 3815, then it will pick out point S1P3815. Works great.

    In Excel 2003 I get an error later on because arrow1X and arrow1Y end up not having a valid value. This is because Excel 2003 doesn't use S1P as the name for Series 1 Point X. So... my question is what does it use? I don't get a tooltip when I hover my pointer over the data like in Excel 2007, so I don't know what it is called. I tried Series 1 Point X, Series1Point, Series1P, etc. Anything I can think of.

    Any help would be appreciated.

    EDIT: For anybody who cares, the solution was to change "2" to "1":

    Please Login or Register  to view this content.
    The code I had found online had an error apparently.

    Thanks to JosephP for the answer.

    http://www.excelforum.com/showthread...=1#post3317934
    Last edited by TomWolowiec; 07-11-2013 at 06:14 PM.

  2. #2
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    Have you tried using the object browser to check for members of "Series" in 2003?

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    as far as I know the arguments for the XLM functions have never changed so I reckon you have a different problem
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    No, it has to be that. Reason being, when I have arrow1X and arrow1Y output their value to a cell to check what it is, it just gives me #VALUE!. Then when I run this:

    Please Login or Register  to view this content.
    It gives me an error at the last line, since there are no numbers to do arithmetic on. And yes, I did have it output "start" and "last" and they are the correct values, so that's not the problem either. Hell, I even changed 2 to 2.0 and 142 to 142.0 to make sure it registers as a Double (they are all Double values).

  5. #5
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    Quote Originally Posted by gjcase View Post
    Have you tried using the object browser to check for members of "Series" in 2003?
    How do I do this?

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    you have activated the chart? I can only say what I know-the arguments look correct to me

  7. #7
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    Yeah I even checked just now by explicitly activating it.

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    I've tested the syntax in 2003 and it works-can you provide a sample workbook where it fails?

  9. #9
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    To access the Object Browser, from the VBA editor, select View/Object Browser. Select Series from the left window, and you can see all members in the right window. Selecting one of them and the "?" will bring up help on that item.

  10. #10
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    the object browser contains no information on XLM functions-you need the macrofun.hlp file for that (and you can't use it on win8 pro)

  11. #11
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    Well, the whole thing looks like this:

    Please Login or Register  to view this content.
    So the thing is meant to draw a box, put text in it, then place arrows that touch the box and point to the two data points I want. I already double-checked to make sure the correct values are being passed into the Subroutine from my main Subroutine. I made sure to make my chart active explicitly. No idea what else to try.

  12. #12
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    it would be helpful if you provide a workbook

  13. #13
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    I don't see how it would help. I open a .csv file with two columns of data of equal length. It's a plot of power vs. time. That's all there is. "start" is the first row where data starts. I get the length of the column and my "last" variable is the length - "start". This may change sometimes, but I know it's accurate from testing. Regardless, I can input my own values for "start" and "last", well within the data range, and it still won't work.

  14. #14
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    it would save us having to create a test workbook that might not include whatever is causing your issue

  15. #15
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    I'm sorry for being so apprehensive about it, but I'm using data from my work and I don't want to break any rules here. What I did do though is make two columns, 1-40 by increments of 1. Ran my macro on it and it was fine on 2007, same error on 2003.

    The relevant parts are this:

    Please Login or Register  to view this content.
    If I do

    Please Login or Register  to view this content.
    I get #VALUE! as output instead of a number. So if you want to reproduce this, make an XY scatter chart (I use mine with non-smooth lines) and then just pick two points from the series as "start" and "last".

    I don't see how anything else could be the problem if that's the part that screws up. Everything up until that point is working fine, and then it breaks on those lines. =/

  16. #16
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    I didn't look close enough-the second argument oughta be 1 for a point
    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    Huh. That just makes me curious as to why it works in 2007. I guess they made the code figure that out on its own or something. In any case, IT WORKS! You are my hero. Thanks for being so patient with me. I really appreciate this.

  18. #18
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using GET.CHART.ITEM on data points in Excel 2003

    you're welcome :-)

    2007 is real buggy and weird-nothing surprises me there

    please don't forget to mark the thread solved

+ 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