+ Reply to Thread
Results 1 to 2 of 2

Macro for Graphs

  1. #1
    Registered User
    Join Date
    04-10-2009
    Location
    Akron, OH
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro for Graphs

    Hi all.

    I'm new to this. I'm needing to create 6 graphs (line) on numerous worksheets and all of my data comes from the same ranges in each. Every page is formatted identically. When I run a Macro, it uses the data from the page that I created the macro on and doesn't automatically pull the data from the sheet I run it on, like I'd like it to. Can anyone help??? What do I need to do in the macro so it uses the current sheet rather than the original?

    Here's the macro I am running now (this would be what I used to create graphs for sheet 44035...but when I run the macro in 44039, it still uses 44035 data...:
    Please Login or Register  to view this content.
    I've attached the file. The data for the next set of graphs is on sheet 44037.
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Macro for Graphs

    I've removed the reference to the creating sheet so this should now work on any of the sheets.

    Please Login or Register  to view this content.
    A logical extension to this would be to put the above code into a loop so that the graphs in all sheets can be generated in one action.
    Martin

+ 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