+ Reply to Thread
Results 1 to 11 of 11

Dynamic Data Range for Bar Chart

  1. #1
    Registered User
    Join Date
    10-17-2007
    Posts
    62

    Dynamic Data Range for Bar Chart

    Hi all,

    I have a column A "Item" and a column B "Price". Then I have a Bar Chart.

    I need the Bar chart data range to be dynamic. By this I mean that if I type more data to the rows of A and B column I need the chart's data range automatically to cover the new rows aswell.

    However, I don't know how to do this and if it is possible at all. I have attached an example file which makes my question easy to understand.


    Best regards,

    Juhanen
    Attached Files Attached Files
    Last edited by Juhanen II; 05-13-2009 at 09:32 AM.

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

    Re: Dynamic Data Range for Bar Chart

    Quickest way.

    Select A1 and on the ribbon use
    Insert > Table

    Your now good to go.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-17-2007
    Posts
    62

    Re: Dynamic Data Range for Bar Chart

    Thanks Andy. However, I don't see how this solves my problem.
    Maybe you didn't open the attached file?

    The thing is, that I want my bar chart to include only the rows which have some data. No empty rows. That is the reason why I don't want to select bigger data range than necessary to my chart. (Or actually I need the range to contain the area untill the last used row, so there might be empty rows between that area)

    Maybe someone could even include the solution to my example file?

    Best regards,

    Juhanen

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

    Re: Dynamic Data Range for Bar Chart

    Yes I did see your file and tested it.

    Did you try what I suggested?

    For me turning the data into a table linked the chart directly to the data.
    Adding new information in row 5 caused the chart to update automatically.

  5. #5
    Registered User
    Join Date
    10-17-2007
    Posts
    62

    Re: Dynamic Data Range for Bar Chart

    Hi,

    Yes I tried to convert the area to table, but unfortunatelly it doesn't work for me. The chart doesn't update. (I'm using Excel 2007)

    Maybe I have to use VBA code insted? Macro recording doesn't work so well with charts, so maybe someone could help me out here please.

    Best regards,

    Juhanen

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

    Re: Dynamic Data Range for Bar Chart

    See attached

    Before resorting to code you might consider using a named range.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-17-2007
    Posts
    62

    Re: Dynamic Data Range for Bar Chart

    The example file you sent back works well. However, I don't want the area to be a list. (There are several users so the dropdown is confusing and messes up too much)

    So, I would be thankful if someone could help me out with vba code. So I need the range to contain the area untill the last used row and to update to the chart automatically when ever there is a change.

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

    Re: Dynamic Data Range for Bar Chart

    right click sheet tab and enter

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-17-2007
    Posts
    62

    Re: Dynamic Data Range for Bar Chart

    Thanks Andy,

    Works just like I asked to.

    One more (the last one) question. If I have several columns, and I want to use data from columns A, B and E (and not from C and D) how do I change the code?

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

    Re: Dynamic Data Range for Bar Chart

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    10-17-2007
    Posts
    62

    Re: Dynamic Data Range for Bar Chart

    Thanks Andy!

+ 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