+ Reply to Thread
Results 1 to 6 of 6

Dynamically changing the series of chart

  1. #1
    Registered User
    Join Date
    01-28-2009
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Dynamically changing the series of chart

    I am getting the X-Values of the series as follows:

    ='Input'!$A$10:$Z$10

    I need to get the number 10 in the above syntax from a cell say B20. How should i change the syntax to get this to work.


    -Varun

  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,444

    Re: Dynamically changing the series of chart

    You'll have to define a named range, and use that in your graph.

    Define the named range as follows:

    =INDIRECT("Input!$A$"&Input!$B$20&":$Z$"&Input!$B$20)
    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
    01-28-2009
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Dynamically changing the series of chart

    Thanks for the help Dave. But I get an error "The function is not valid".


    -Varun

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Dynamically changing the series of chart

    Sweep's syntax looks good to me. Post a workbook
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    01-28-2009
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Dynamically changing the series of chart

    I have attached a sample spreadsheet. I need to plot on sheet 'graph'
    A1:L1 on x-axis vs A2:L2 on y-axis. The "2" here in the Y-values comes
    from B6.

    I am using the following:

    =INDIRECT("Input!$A$"&Input!$A$6&":$L$"&Input!$A$6)

    and getting the error : "The function is not valid"

    -Varun
    Attached Files Attached Files

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dynamically changing the series of chart

    Try creating a Name as follows:

    Name: ChtY
    RefersTo: =INDEX(Input!$A$1:$L$3,$A$6,0)

    Now in your chart create the Series:

    Series Name: "whatever"
    Series Values: =Input!ChtY

    As you alter A6 so the Chart should update accordingly.

+ 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