Consulting

Results 1 to 6 of 6

Thread: Update chart when adding new sheets of data

  1. #1
    VBAX Newbie
    Joined
    Mar 2019
    Posts
    3
    Location

    Question Update chart when adding new sheets of data

    Hello,

    I do a lot of simple raw-data presentations in my projects where I simply want to show the data fast before I go into deeper analysis. For this I want to simply dump my data (a new sheet for every dataset) and have a graph update with my data as I add sheets. To do this manually gets very tedious. On every sheet I want to add the same range, let's for simplicity say I want to add columns A1:A5 against B1:B5 from "Sheet1" , "Sheet2"... and so on. How would one go about creating such a chart, I'm assuming it's through some kind of VBA script but I have never delved into VBA-scripts before. Does anyone know of any thread which goes through similar topics, I was unable to find any.

    With Regards
    /Z

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    Does each sheet have it's own chart showing data from that sheet and always from the same range?

    Example, you have ...

    Sheet 1 - Line Chart1 using Sheet1!A1:A5 vs B1:B5
    Sheet 2 - Line Chart2 using Sheet2!A1:A5 vs B1:B5
    Sheet 3 - Line Chart3
    using Sheet3!A1:A5 vs B1:B5


    and when you insert Sheet4 with data Sheet4! A1:A5 vs B1:B5 you want a new

    Line Chart4 using Sheet4!A1:A5 vs B1:B5???
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Newbie
    Joined
    Mar 2019
    Posts
    3
    Location
    Yes that is right, at least to some degree. I have 3 methods of acquiring data and usually name my sheets the same as my datapoint and the method used, something like this:

    Point1-Method1
    Point2-Method1
    Point3-Method2

    and so on.

    In many cases I have hundreds of datasets from different points and the three methods. What is consistent though is that for each method every dataset is presented the exact same way with regards to which data I want to display in my chart.
    I have attached an example to this message which might clear things up 😊 I Appreciate all help I can get!
    Attached Files Attached Files

  4. #4
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Hi zhunage!
    Although I don't quite understand what you mean, but I made an interesting thing for you.
    Please refer to the attachment.



    -Okami
    Attached Files Attached Files
    Last edited by 大灰狼1976; 03-22-2019 at 02:12 AM.

  5. #5
    VBAX Newbie
    Joined
    Mar 2019
    Posts
    3
    Location
    Hello Okami,

    that was pretty cool, being able to update the graph by switching the drop-down cell.
    I'll keep it in mind when designing my workbook. Thanks a million!

    With regards,
    Zhunage

  6. #6
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    You're welcome

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •