+ Reply to Thread
Results 1 to 3 of 3

Plotting graph excel VBA

  1. #1
    Registered User
    Join Date
    02-16-2012
    Location
    sa
    MS-Off Ver
    Excel 2007
    Posts
    80

    Plotting graph excel VBA

    Good day,

    I am trying to plot multiple line graphs on one chart but am having trouble setting the SeriesCollection values. I think the problem is because data set it in one column only

    eg

    A B C

    Jan-12 Name1 3
    Feb-12 Name1 9
    Mar-12 Name1 4
    Jan-12 Name2 5
    Feb-12 Name2 8
    Mar-12 Name2 12

    Hence, I would like to plot Name1 and Name2 data on one chart for each month.

    How do I do this in vba?

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Plotting graph excel VBA

    I think the problem is because data set it in one column only
    As I suggested yesterday, I agree with this assessment -- I think much of the difficulty is related to having the data in a single "list". I suggested that you put the data into a different format, and suggested that you review Dennis Wallentin's code for filtering and copying data. Did you judge Mr. Wallentin's code unsuitable, or did you not understand enough of it to implement his code? It might help us help you if we understood what about the previous suggestions you found unsuitable.

    If you are simply unfamiliar with Excel's filtering functions, I might suggest that you start by doing the task manually (http://office.microsoft.com/en-us/ex...616.aspx?CTT=1 ). In the process of automating Excel's features, I often find that I need to understand how to use the feature manually before I can effectively write code to automate the same process.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    02-16-2012
    Location
    sa
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Plotting graph excel VBA

    Thank you everyone, I did consider the use of filtering however, this did not suit the data source I am using.

    I did find a solution by using .Chart.SeriesCollection.NewSeries.Values for each of the charts I want to add.

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Plotting graph excel VBA
    By blh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2014, 10:52 AM
  2. [SOLVED] Plotting a standard bar graph on the same axes as a stacked bar graph
    By Shearwater in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-01-2014, 04:59 AM
  3. Excel Graph Plotting
    By callsaravananr in forum Excel General
    Replies: 4
    Last Post: 07-12-2009, 12:28 PM
  4. plotting a line graph on a bar graph
    By mufan in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-02-2009, 03:29 PM
  5. Plotting a Graph
    By Mayank in forum Excel General
    Replies: 2
    Last Post: 06-09-2006, 03:15 PM

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