+ Reply to Thread
Results 1 to 1 of 1

Creating a chart with VBA

  1. #1
    Registered User
    Join Date
    10-23-2017
    Location
    Boston, MA
    MS-Off Ver
    Excel 365
    Posts
    73

    Creating a chart with VBA

    I have some code to create a chart in VBA from a range, but I have two main problems at the moment:
    1. How do I change "Series1" and "Series2" to the labels I want to use?
    2.a. The source data is 3 columns. It's making all three columns into series, but I want the first column to be the x-axis.
    2.b. Alternately, I don't need the first column because the values in it are the row numbers. But when I make the chart and try to select a range that doesn't start on row 1, it makes the x-axis start counting at 1 anyway, so all the x-values are wrong.

    Please see attached file. What I want is for the chart to display the B and C columns, but I want to omit all rows where both are equal to 0 (they're bell curves so these are the tops and bottoms of the columns). If you click the "Make Chart" button, the look of the bars is pretty much how I want but the numbering on the x-axis is all wrong. The high points in the middle of the bell curves are supposed to be around x=200ish.
    Attached Files Attached Files

+ 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. How to designate a chart name when creating a chart from Application.Run
    By nguerra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2020, 03:51 AM
  2. [SOLVED] Creating a combo Stock-Candlestick chart & Line Chart
    By ExcelBoy90 in forum Excel Charting & Pivots
    Replies: 14
    Last Post: 12-25-2019, 02:01 AM
  3. Creating chart in VBA? Chart based on user selected date?
    By Elijah in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-29-2018, 09:25 PM
  4. Creating a Japanese Candle Stick Chart with Line Chart
    By Navin Agrawal in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-08-2016, 11:41 PM
  5. Creating dynamic userform based on several file names and creating chart overlays
    By Thorn23 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2014, 12:09 PM
  6. Replies: 12
    Last Post: 02-07-2014, 04:00 PM
  7. Default chart size when creating a new chart
    By simjambra in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-15-2010, 11:49 AM

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