+ Reply to Thread
Results 1 to 3 of 3

Excel line chart using macro

Hybrid View

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    5

    Thumbs up Excel line chart using macro

    Hi All,

    I need help to draw line chart using Excel macro.

    I have a table

    1-Jun-2012 2-Jun-2012 3-Jun-2012
    ID Description Rank Rank Rank
    id1 ... 2 4 5
    id2 ...... 3 5 7
    id3 ........ 1 3 8


    Need to add a list box , it will list id1,id2,id3. when I select id1 then i want to get a line graph with
    x axis- 1-Jun-2012, 2-Jun-2012, 3-Jun-2012,...
    y axis- 2, 4, 5



    Thanks,
    Smartgd

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Excel line chart using macro

    This can be done without a macro.

    One possible approach is to use a Vlookup formula to populate the cells that feed the chart. See attached. Select an ID in the yellow cell. The chart will update.

    Other approaches, without VBA, could involve using named ranges.

    Let me know if this works for you or if you would like a different approach.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-04-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel line chart using macro

    Hi,

    your attached file works fine, but i like to do with macro.



    Thanks,
    smartgd

+ 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