+ Reply to Thread
Results 1 to 5 of 5

VBA Dynamic Range - An Indirect Cell Reference

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    3

    VBA Dynamic Range - An Indirect Cell Reference

    I have a chart that I want to produce from a variable table range.
    the range is cell GraphData!A26 which is fixed, and cell B24 contains a computed value for the end range i.e. GraphData!M29, which when linked as an indrect cell works great.

    I am trying to create a macro for a button to update the graph as if different options are selected then the graph range changes.

    So far I have this:

    Please Login or Register  to view this content.
    I am having trouble with the range, after looking at other threads i've tried Range("A26:" & Range("B24").Value).Select however it isn't working.

    Any help would be great, thanks
    Last edited by JosephP; 01-10-2013 at 10:06 AM. Reason: add code tags-please learn to use them!

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

    Re: VBA Dynamic Range - An Indirect Cell Reference

    if the cell includes a sheet name perhaps
    Please Login or Register  to view this content.
    Josie

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

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: VBA Dynamic Range - An Indirect Cell Reference

    I have included the sheet name only as the graph is being displayed in another sheet, however the cells used for the range are in the same sheet as the data itself.

    If I try to recreate the macro I get:
    Please Login or Register  to view this content.
    This is when I use GraphData!A26:Indirect(GraphData!B24) for the Range

    It works and pools together the correct range, however when i check VBA it changes the indrect cell link to the cell M31, I need this to have an indirect cell link to B24.

    Does that help?
    Last edited by JosephP; 01-10-2013 at 11:09 AM. Reason: code tags AGAIN

  4. #4
    Registered User
    Join Date
    01-10-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: VBA Dynamic Range - An Indirect Cell Reference

    It still shows an error im affraid

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

    Re: VBA Dynamic Range - An Indirect Cell Reference

    please post a workbook (censor the data if necessary)

+ 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