+ Reply to Thread
Results 1 to 2 of 2

setting chart values with a formula

  1. #1
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    setting chart values with a formula

    when referencing values in a chart you have to either input solid values or reference a range/array.
    is there a method through vba that would allow me to use a formula?
    another way to look at it is how can i output the results of a formula as an array?

    I am trying to union the xvalue ranges of 2 graphs and use a vlookup to set the yvalues however both ranges can be of veriable sizes so i cannot fill in cells with vlookups.

  2. #2
    Registered User
    Join Date
    06-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: setting chart values with a formula

    Leon,

    I have attached a file with the graph y=x^2. You can add as many additional data points as you want and the graph will automatically adjust.

    You need to do 2 things:

    1) create named ranges for x and y, they are of the form "=OFFSET(Sheet1!$A$2,0,0,COUNT(Sheet1!$A:$A),1)" so they will expand depending upon how many data points you have

    2) use these named ranges in the graph.

    Screenshots of 1 & 2 are included to help you. Any problems come back to me.

    Regards

    David
    Attached Files Attached Files
    Last edited by JBeaucaire; 08-14-2013 at 10:33 AM.

+ 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. setting chart series formula fails intermittently in Excel 2007/2010
    By xlrotor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2012, 03:51 PM
  2. Setting threshold to assign real values to class values
    By themoss1985 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2011, 11:50 PM
  3. Runtime Error 1004 when Setting Setting Series Values
    By tonymctigue in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-09-2010, 10:05 AM
  4. Merging code for hiding columns and setting chart axes values
    By tuckjoseph in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2010, 01:19 PM
  5. Setting Chart MajorUnit for Clean lookng Chart
    By JbL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-24-2005, 04: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