+ Reply to Thread
Results 1 to 2 of 2

X-axis variable reference

  1. #1
    april27
    Guest

    X-axis variable reference

    Hi! I am having trouble with constructing an x-axis in my macro for excel.
    since the x-axis changes all the time I want to have a dynamic reference. The
    code now is:

    ActiveChart.SeriesCollection(1).XValues = rng1.Address rng1.Offset(i,
    0).Address

    As you can see the right hand side is incorrect. However I do not know how
    to refer to the cells. Please help me out on this one!!!!

  2. #2
    Tom Ogilvy
    Guest

    RE: X-axis variable reference

    ActiveChart.SeriesCollection(1).XValues = rng1.parent.Range(rng1, _
    rng1.Offset(i,0)).Address(1,1,xlA1,True)

    --
    Regards,
    Tom Ogilvy



    "april27" wrote:

    > Hi! I am having trouble with constructing an x-axis in my macro for excel.
    > since the x-axis changes all the time I want to have a dynamic reference. The
    > code now is:
    >
    > ActiveChart.SeriesCollection(1).XValues = rng1.Address rng1.Offset(i,
    > 0).Address
    >
    > As you can see the right hand side is incorrect. However I do not know how
    > to refer to the cells. Please help me out on this one!!!!


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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