+ Reply to Thread
Results 1 to 3 of 3

VBA Line Chart

Hybrid View

  1. #1
    Registered User
    Join Date
    10-20-2016
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013
    Posts
    2

    Question VBA Line Chart

    Hello guys,

    I am trying to graph a LINE chart in Excel 2013 by VBA. So, here is a data I am trying to graph:

    Months Passed 1 2 3 4 5
    01/01/2014 2% 3% 5% 7% 10%
    02/01/2014 1% 4% 6% 19% 0
    03/01/2014 20% 21% 21% 0 0
    04/01/2014 13% 13% 0 0 0
    05/01/2014 7% 0 0 0 0

    I could not paste this data properly, so here is the image of it:

    Untitled.png

    I am trying to graph a line chart, with X values of 1,2,3,4,5 and Y values of Percentages. My series will be Dates.
    Moreover, I want to graph lines without 0 values. For example, Series 2 (02/01/2014) with values of only 1%, 4%, 6% and 19%. Series 3 (03/01/2014) with values 20%, 21%, 21%. To clarify, something like this:

    Months Passed 1 2 3 4 5
    01/01/2014 2% 3% 5% 7% 10%
    02/01/2014 1% 4% 6% 19%
    03/01/2014 20% 21% 21%
    04/01/2014 13% 13%
    05/01/2014 7%

    I could not paste this data properly, so here is the image of it:

    Untitled1.png

    I tried several ways but still can not graph it. Could you please help me?

    Thanks in advance.
    Last edited by Meruem; 10-20-2016 at 07:24 AM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,380

    Re: VBA Line Chart

    I think a sample file which includes some of those failed attempts would be helpful for us to understand what you want.

    I expect that the difficulty is how to "hide" the 0 values in the chart. Have you tried using N/A for those values? I would expect that to work just fine. See this discussion on simulating empty cells in charts: http://peltiertech.com/mind-the-gap-...g-empty-cells/
    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
    10-20-2016
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013
    Posts
    2

    Re: VBA Line Chart

    Wow, thanks a lot! Now I do not even need a VBA code

+ 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. Line chart too wide (52 weeks) How to make it the line chart automatically?
    By sovietchild in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 06-26-2016, 08:20 PM
  2. [SOLVED] Chart Lengend to show marker style on hidden line - Line chart
    By etaf in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 08-22-2013, 05:19 PM
  3. Replies: 2
    Last Post: 11-14-2012, 08:59 AM
  4. [SOLVED] Display vertical line on stacked line chart already using primary and secondary axises
    By ben_hensel in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-05-2012, 10:21 AM
  5. How to create a vertical reference line on a time series line chart
    By Bladebgii in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-23-2012, 10:17 AM
  6. Replies: 4
    Last Post: 07-05-2006, 11:10 AM
  7. Change Line Column Chart to Line Area chart
    By recchie in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-23-2005, 11:40 AM

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