+ Reply to Thread
Results 1 to 2 of 2

Range in chart changes when I create a new WS

  1. #1
    Registered User
    Join Date
    07-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    19

    Unhappy Range in chart changes when I create a new WS

    Hi all,

    The workbook is set up so that gearbox oil samples are collated in a table in the "blank" WS with bar charts that reference cells in the blank WS. A macro then duplicates the blank WS charts n'all, renames it (gives it the name of the gearbox in cell A2, and then goes back to the "blank" WS, and I can then select another gearbox to create another individual WS.

    The problem is (it used to work!!) that the charts on the new WS's created have started referencing back to the cells in the "blank" WS, and not the cells in the re-named WS.

    for example, Series 1 is:
    =SERIES(blank!$E$5:$F$5,(blank!$G$4,blank!$I$4,blank!$AD$4),(blank!$G$5,blank!$I$5,blank!$AD$5),1).

    it should be:
    =SERIES(IGB01!$E$5:$F$5,(IGB01!$G$4,IGB01!$I$4,IGB01!$AD$4),(IGB01!$G$5,IGB01!$I$5,IGB01!$AD$5),1) where IGB01 is the name of a gearbox (and name of WS). This reference should change when a new WS is created.

    It does work with MS Excel 2003, but not 2007 which we're working with.

    I've thought of using INDIRECT, but can't seem to get the code right?

    Any ideas or need more info??

  2. #2
    Registered User
    Join Date
    07-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Range in chart changes when I create a new WS

    Works in MS Excel 2010...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Create a chart that uses a range defined in cells
    By rrbest in forum Excel General
    Replies: 2
    Last Post: 09-26-2011, 06:20 PM
  2. Create Chart on a Filtered Range
    By rogerabhi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2010, 08:33 AM
  3. Create chart using data array (not range)
    By Pingu in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-07-2009, 12:17 PM
  4. Replies: 2
    Last Post: 12-05-2008, 12:01 PM
  5. create a chart without set range
    By Noemi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2005, 10:05 PM

Tags for this Thread

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