+ Reply to Thread
Results 1 to 2 of 2

VBA Code Tweaking Needed for Graph References

  1. #1
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    155

    VBA Code Tweaking Needed for Graph References

    In the attached, I have VBA coding that duplicates the Main Sheet for each department found on the data tab. When the Main Sheet is copied for each department, the graphs seen in row 101 and below have a horizontal axis reference to the Main Sheet versus the current department sheet. Is there something in the VBA code or the horizontal access formula on the graphs that we can change so that each worksheet that gets created can reference its own worksheet for the graphs?

    I have attached the worksheet.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-23-2015
    Location
    Spain
    MS-Off Ver
    2007
    Posts
    32

    Re: VBA Code Tweaking Needed for Graph References

    Easy one :P

    Please Login or Register  to view this content.
    Supposing that the names you want to appear in the graphs are in that range...

    A better/simpler solution would be to use a sheet-level named range for the cells that you want to reference... ie, a named range for 'Main Sheet' (not for the book!) called "xNames" = $AC$3:$AC$100
    Thus, this sheet-level named range would get copied to the rest of the sheets when duplicating it:
    Please Login or Register  to view this content.
    so you don't have to worry about changing the range address in the code if you ever modify the template sheet.

    Hope it helps!
    May the REPUTATION be with me

+ 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. Help needed with tweaking Ron de Bruin's mail code
    By andy_iyeng in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-23-2016, 08:02 AM
  2. References needed to run my code
    By Doruli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2013, 03:03 AM
  3. need help tweaking my search code
    By mrchip in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2011, 02:33 AM
  4. VBA code tweaking needed.
    By percy83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2009, 09:58 AM
  5. Graph tweaking
    By smaug82 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-04-2008, 06:35 AM
  6. Tweaking Code
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2006, 03:20 PM
  7. [SOLVED] Tweaking Code
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2006, 10:25 PM
  8. [SOLVED] Need help - track changes code needs tweaking
    By purpleme3 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2005, 07:50 PM

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