+ Reply to Thread
Results 1 to 3 of 3

Macro shows three seperate data ranges in line graph

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Macro shows three seperate data ranges in line graph

    Apologies if this has been answered before, but I couldn't find a solution.

    Attached file Three Col Graph.xlsm has Macro that SHOULD create a line graph from data in Cols C. E and G

    The Macro in the file creates the graph using data in ONE Column, but I can't find how to set the values to cover all three columns.

    Please Login or Register  to view this content.
    Any suggestions received gratefully

    Ochimus

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro shows three seperate data ranges in line graph

    Hi,

    Edit: now I think this might work..:

    Please Login or Register  to view this content.
    The problem was that you were trying to put all data into one series... when they are actually 3 separate data series. I would have used a loop but wanted to keep it simple to follow and close to original code.
    Last edited by Arkadi; 04-22-2015 at 12:24 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Macro shows three seperate data ranges in line graph

    Arkadi,

    Many thanks for the solution. Obviously I was misled by the fact the when you create the graph manually you enter the three ranges together separated by commas.

    I have now been asked to create a "Log Y" axis AND reverse them so the Data becomes the Y axis.

    Which will clearly have to be topics for another thread - or two.

    Ochimus

+ 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. [SOLVED] code for data range selection to create a line graph in a macro
    By dominicm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-17-2015, 09:35 AM
  2. Maximum number of ranges in an Excel 2010 line graph?
    By Carrfamily in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-31-2015, 04:47 PM
  3. Line graph shows flatline because formulas show 0.00 - HELP!!
    By julie0305 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-01-2013, 12:15 PM
  4. [SOLVED] Macro to make a graph: help selecting the data ranges.
    By Isabel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2006, 11:35 AM
  5. macro to print line graph from data in cells
    By WSIB#1 in forum Excel General
    Replies: 0
    Last Post: 02-18-2005, 10:06 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