+ Reply to Thread
Results 1 to 3 of 3

graph series from reference?

  1. #1
    Registered User
    Join Date
    12-16-2009
    Location
    Tennessee, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    graph series from reference?

    A few months ago, several people at this site helped me get my hands around the INDEX statement and using it to refer to a cell range correctly. I'm now trying to use something similar for the 'Series Values' for a chart.

    I've got data in cells E1:E1000 of a spreadsheet. I arbirtrarily choose sections of this range based on the values in two other cells (L1 and L2). I can use the INDEX function to return the corresponding values in the E1:E1000 range as follows

    Cell Q1-->=INDEX(Results!E$1:E$1000,L$1)
    Cell Q2-->=INDEX(Results!E$1:E$1000,L$2)

    If L$1 holds the value '10' and L$2 holds the value of '45', then the above formulas will show the value of cell E10 in cell Q1 and the value of cell E45 in cell Q2.

    What I want to do is use the cell range E10:E45 as a data series in a graph based on the above idea (that is, I'd like to be able to change the values in L$1 and L$2 in order to show different 'sections of data' for my graph line. I've tried several things but can't seem to make the graph data series recognize such a desire. Ideas?

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: graph series from reference?

    Hi,

    You need a named range.

    Press CTRL F3 then new

    enter a name for your range and then in the "refers to" dialogue:

    =INDEX(Results!E$1:E$1000,L$1):INDEX(Results!E$1:E$1000,L$2)


    Insert a chart, select data > edit series

    Enter the name of your named range in the "values" dialog, preceded by a valid sheet name ie

    =Results!MyNamedRange

    The chart should then respond to the range as you change it.

    Please see attached example for further info.
    Attached Files Attached Files
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    12-16-2009
    Location
    Tennessee, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: graph series from reference?

    Thanks, Sweep!

    I found this post elsewhere while searching the 'net.

    http://stackoverflow.com/questions/1...nd-dynamically

    However, your approach (along the same lines, in a way, as the link above) is the one I prefer.

    Again - sincerely appreciated.

+ 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