+ Reply to Thread
Results 1 to 11 of 11

Graphs with differnet amounts of data

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

    Graphs with differnet amounts of data

    Hi,

    I have tried follow the guidlines on the website http://peltiertech.com/Excel/Charts/Dynamics.html under the Chart the Last 12 Months Dynamically part.

    However it hasnt quite worked for me - i have attached a copy of what i have done. I think i can see what has gone wrong, it is looking upwards for data, rather than downwards but i do not know how to fix it

    Any help would be appreciated

    Thanks

    Antony
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Graphs with differnet amounts of data

    Try this revision

    ChtCats: =OFFSET(data!$A$4,MAX(1,COUNTA(data!$A:$A)-chtLen),0,MIN(COUNTA(data!$A:$A)-1,chtLen),1)
    Last edited by Andy Pope; 04-08-2010 at 10:28 AM.
    Cheers
    Andy
    www.andypope.info

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

    Re: Graphs with differnet amounts of data

    Hi,

    thanks for that.

    I have tried to write a macro to build the graph automatcially aswell
    Please Login or Register  to view this content.
    however i am unsure as to why it needs to pull the name of the xls, as i need this to be dynamic as every day i would like to be able to run the macro to create the graph.

    Any ideas on how i get round this?

    Thanks

    Antony

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Graphs with differnet amounts of data

    Please Login or Register  to view this content.

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

    Re: Graphs with differnet amounts of data

    Hi Andy,

    thanks for the above.

    I have also macroed to write the defined names, however it puts the " " at the begining and end of the wording and therefore doesnt like it - is there a way around this?

    Thanks

    Antony

    Please Login or Register  to view this content.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Graphs with differnet amounts of data

    try

    Please Login or Register  to view this content.

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

    Re: Graphs with differnet amounts of data

    Hi,

    I have done all of the above, and so at the back end of the macro i have the below. However it bombs out at the XValues bit. If i run the other part of my macro without the below, then run the below bit separately it works - it is a right head scratcher.

    Let me know if you need any further info

    Antony

    Please Login or Register  to view this content.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Graphs with differnet amounts of data

    Works for me. See attached. Run the Test macro.
    Attached Files Attached Files

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

    Re: Graphs with differnet amounts of data

    HI andy,

    it works for me fine as two parts, but not as a whole. I cant down load anything at work, so will have to check tonight

    Antony

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

    Re: Graphs with differnet amounts of data

    Hi Andy,

    I think I may has spotted the issue - I agree the macro works fine in your work book and if I copy it into another workbook it works ok as well, the issue comes if I try and run the Marco whilst it is one workbook against data in another work book, which is going to cause me an issue as I would ideally like to save this Marco in my personal, as I am going to need to be able to run it daily.

    Any ideas????

    Thanks

    Antony

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Graphs with differnet amounts of data

    Try changing the Thisworkbook references to Activeworkbook.

    Please Login or Register  to view this content.

+ 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