+ Reply to Thread
Results 1 to 3 of 3

Macro to update graph source data

  1. #1
    Forum Contributor
    Join Date
    11-24-2008
    Location
    leicester
    MS-Off Ver
    Microsoft 365
    Posts
    161

    Macro to update graph source data

    Hi,

    I would like to write a macro to be able to update the source data for a graph every week.
    The data is under series tab, rather than data range.
    Series header NET
    this week the values are:
    =Weekly!$AB$5:$AB$16
    next week i will want it to show
    =Weekly!$AB$5:$AB$17

    and the category X axis labels will need to change from =Weekly!$A$5:$A$16 to =Weekly!$A$5:$A$17.

    Any ideas?

    Thanks

    Antony

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671
    Please look into the excel file. You can use DYNAMIC ranges

    Xdata: =OFFSET(Sheet1!$AB$5,0,0,COUNTA(Sheet1!$AB$5:$AB$100),1)
    Ydata: =OFFSET(Xdata,0,1,,)

    Graph: =SERIES("Graph",dyn_graph.xls!Xdata,dyn_graph.xls!Ydata,1)

    Please add your own values into AB17, AB18, ...
    Attached Files Attached Files
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Contributor
    Join Date
    11-24-2008
    Location
    leicester
    MS-Off Ver
    Microsoft 365
    Posts
    161
    Hi,

    Where do i add my version of
    Xdata: =OFFSET(Sheet1!$AB$5,0,0,COUNTA(Sheet1!$AB$5:$AB$100),1)
    Ydata: =OFFSET(Xdata,0,1,,)

    Graph: =SERIES("Graph",dyn_graph.xls!Xdata,dyn_graph.xls!Ydata,1)

    Thanks

    Antony

+ 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