+ Reply to Thread
Results 1 to 11 of 11

Creating a Dynamic Graph Using Text Cell References

Hybrid View

derekjwilson Creating a Dynamic Graph... 04-01-2013, 10:55 AM
AndyLitch Re: Creating a Dynamic Graph... 04-01-2013, 11:13 AM
Andy Pope Re: Creating a Dynamic Graph... 04-01-2013, 11:16 AM
derekjwilson Re: Creating a Dynamic Graph... 04-01-2013, 11:48 AM
Andy Pope Re: Creating a Dynamic Graph... 04-01-2013, 11:52 AM
derekjwilson Re: Creating a Dynamic Graph... 04-01-2013, 12:45 PM
AndyLitch Re: Creating a Dynamic Graph... 04-01-2013, 12:50 PM
derekjwilson Re: Creating a Dynamic Graph... 04-01-2013, 01:04 PM
derekjwilson Re: Creating a Dynamic Graph... 04-01-2013, 01:06 PM
Andy Pope Re: Creating a Dynamic Graph... 04-02-2013, 06:57 AM
derekjwilson Re: Creating a Dynamic Graph... 04-02-2013, 11:43 AM
  1. #1
    Registered User
    Join Date
    03-28-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2007
    Posts
    8

    Creating a Dynamic Graph Using Text Cell References

    Good morning,

    I am looking to create a graph based on a range between two cells.

    The user defines the row of these cells, and then indicates the desired start and end range (ie. start column and end column) in a specific area.

    Using this information, I have produced using the ADDRESS function two text cell references, which are located on sheet "References".

    Results:

    'Suburban (By District)'!$K$2 (Located in K4)
    'Suburban (By District)'!$U$2 (Located in L4)

    The sheet, row, and column are variable and determined by the user, so these locations will change depending on the user input. I want the graph to actively reflect these changes.

    In any case, my assumption was that I could make the range = 'References'!$K$4:'References'!$L$4'. This does not work. I imagine I should use the INDIRECT function, but that returns the values of the aforementioned locations, not the locations themselves.

    How do I create this range based on the text in K4 and L4?

    Thanks for any help.

    Regards,

    DJW
    Last edited by derekjwilson; 04-01-2013 at 10:58 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Creating a Dynamic Graph Using Text Cell References

    If I understand you correctly you'll be needing Offset and dynamic Named Ranges which can autosize to fit the dataset
    Elegant Simplicity............. Not Always

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Creating a Dynamic Graph Using Text Cell References

    Named range xCHT_DATA
    =INDEX(INDIRECT(References!$K$4),1,1):INDEX(INDIRECT(References!$L$4),1,1)

    You will need to add additional single quote to start of cell otherwise it will be ignored.

    K4: ''Suburban (By District)'!$K$2
    L4: ''Suburban (By District)'!$U$2
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    03-28-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Creating a Dynamic Graph Using Text Cell References

    Hi Andy,

    Thanks for the help. A quick question - how do I add the additional quotation mark? The text string is generated by a formula, so if I enter it, the cell turns the formula into a string.

    The formula is:

    =IF(VLOOKUP(Settings!$G$6,$B$2:$D$39,3, FALSE)="C","Suburban (By Class)","Suburban (By District)")

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Creating a Dynamic Graph Using Text Cell References

    Something like this

    =IF(VLOOKUP(Settings!$G$6,$B$2:$D$39,3, FALSE)="C","''Suburban (By Class)","''Suburban (By District)")

    Although your formula has no single quotes so I don't know where they are coming from in the first place.

  6. #6
    Registered User
    Join Date
    03-28-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Creating a Dynamic Graph Using Text Cell References

    Ok - so this is what I am doing.

    =IF(VLOOKUP(Settings!$G$6,$B$2:$D$39,3, FALSE)="C","'Suburban (By Class)","'Suburban (By District)")

    [Result] >>> 'Suburban (By District)

    =ADDRESS(I4,$I$21,,,$J$2) (J2 is the previous result)

    '''Suburban (By District)'!$K$2


    For some reason, when I add in the extra ' in the first formula, the second formula outputs three 's - one that it did already, and another from who knows where.

    Essentially, 1 + 1 = 3.

    No matter what I try, I always get ', or ''', or '''', but never '' - which is apparently what I need.

    Thoughts?

  7. #7
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Creating a Dynamic Graph Using Text Cell References

    use ascii instead .... char(x)

  8. #8
    Registered User
    Join Date
    03-28-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Creating a Dynamic Graph Using Text Cell References

    I'm having trouble understanding why it is so difficult to put together a range based on two cell locations produced by the address function.

    Given that the ADDRESS function is specifically designed to return a cell reference, shouldn't it be usable to construct a range? And if not, how do I convert the text address into a cell reference?

  9. #9
    Registered User
    Join Date
    03-28-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Creating a Dynamic Graph Using Text Cell References

    Or perhaps I can modify my function.

    I have the following:

    -Sheet
    -Row
    -Start Column
    -End Column

    How do I construct a range out of this, provided that the graph is on a sheet separate from the data?

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Creating a Dynamic Graph Using Text Cell References

    Here is an example that may help.
    Otherwise you might be better off posting an example of your workbook
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    03-28-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Creating a Dynamic Graph Using Text Cell References

    Got it - thanks immensely.

+ 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