+ Reply to Thread
Results 1 to 7 of 7

Chart from a block of cells never same

  1. #1
    Registered User
    Join Date
    10-03-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    4

    Chart from a block of cells never same

    Hi, I hope someone can help there, cause I spent the last 15h trying to find a forum with an answer and nobody seems to have had the same problem than me, even if it is quite simple ...

    So, I have a Sheet with a certain amount of data on it. It is produced by macro and has max 50 columns and max 500 rows.
    It means that my macro produce one time a block (always block) with 5 columns and 100 rows, and sometimes 35 columns and 300 rows (for example !!).
    it looks like:
    andy john jane
    rt 4 2 3
    he 3 4 23
    ns 1 7 3
    mw 4 3 7

    So, I want from this point to create a chart (the options of the chart, I can deal with) with this block, but only with the data that are in the block.
    If I take the range 50 columns, 500 rows, I get a stupid graph with 3 lines of data, and 497 empty lines ... cause excel does not understand that empty columns are not data.
    I found some macro that allow to select only row and columns that are not empty, but after, I can't get this into the macro doing the chart itself ...
    Things like

    Set atr = Range(CurrentRegion)
    ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range(atr)

    do not work at all ..

    please HELP me !!!
    julien

  2. #2
    Registered User
    Join Date
    10-03-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Chart from a block of cells never same

    What about using End(xlToLeft).Column ?? but then, I still don't get it into the Range function for the chart ...

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

    Re: Chart from a block of cells never same

    You need to post an example workbook of the data and define what is an empty data set.

    The code will probably need to add series at a time rather than setting the source data all at once.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    10-03-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Chart from a block of cells never same

    Thanks Andy Pope,
    So, I put two examples of what could be a table, and the type of chart that would need to be created from the macro then.
    I can't put the macro itself that I made, because it is using data picked in a folder ( the data is generated by analytical machine, and every sample produce one data set all in one folder, so it could be up to 50 samples analysed, and therefore up to 50 dataset in the folder, and at the end, the full macro is supposed to show a chart with all the samples analysed). The data are then copied and worked in the Sheet of the results. But at the end, the result is exactly like one of the 2 in the file:
    - one block, starting in A1, in row 1 are the name of the series, in column A is the x-coordinate, and the rest are the y-coordinate.
    - the block has no blank data

    Thanks for your help

    PS:If you believe there is no another way if you don't get my macro, I can put all that in a zip, but it's quite complicated ;-) ... but if you want to see the macro for fun, I can send it !
    Attached Files Attached Files

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

    Re: Chart from a block of cells never same

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-03-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Chart from a block of cells never same

    NICEEEE, seems to work very smoothly, and it was not so hard ! Thanks A LOT Andy ! You're the king !

  7. #7
    Registered User
    Join Date
    10-04-2012
    Location
    denver, colorado
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Chart from a block of cells never same

    Hi,
    I am trying to us a macro where I can display selected rows from another sheet to appear based on a name selected from a list. for example i have a bunch of sales contracts in a list where we can purchase from different areas.. so when I select one sales contract from the list I want to purchase options to appear from my purchase sheet that I select. Please, any help would be appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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