+ Reply to Thread
Results 1 to 5 of 5

Offset Function Chart from selected columns

Hybrid View

  1. #1
    Registered User
    Join Date
    02-06-2008
    Posts
    7

    Offset Function Chart from selected columns

    Hi,

    I have a table of data with the dates in column A and then various different types of data in the following columns, and I add new data to the bottom of the table each week. I have several charts that are linked to this table and and display what has happened historically as line graphs. Rather than always manually editing the data range for each graph each week I was going to use the OFFSET function in a range and macro to automatically add the new data to my graphs each week.

    The problem is that as the date data is in the first column I am unable to use ranges for my data names, as I need to skip some columns for certain graphs. Example:

    Date Column B Column C Column D
    01/01/2008 102 139 141
    02/01/2008 111 174 162
    03/01/2008 106 175 157
    04/01/2008 158 166 172
    05/01/2008 162 138 166

    So I want one line graph with the Dates and data from B & C, and another with the Dates and C & D data.

    Anyone have any ideas how I can use the one table and have several easily updatable graphs (e.g. via click macros) linked to it?

    Many thanks in advance,

    Stebo148

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481
    Have a look at this post.
    Here a single line is plotted but the source of the line is dependent on which option button is selected.
    http://www.excelforum.com/excel-char...io-button.html

    Also search for 'Dynamic named ranges'
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    02-06-2008
    Posts
    7
    Thanks Andy,

    The radio button idea might work. Is there a way to rewrite the code so that I can display multiple lines at the same time for trend comparisons? (e.g. use multiple check boxes)

    Ideally I would still prefer to be able to set up dynamic named ranges that uses only specified columns from the table, i.e. thcolumns that aren't necessarily next to one another, so that I can have all the graphs displaying the right data already when people open up the sheet.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481
    Jon's collection of dynamic charting should give you all the information you need.
    http://peltiertech.com/Excel/Charts/ChartIndex.html#D

  5. #5
    Registered User
    Join Date
    02-06-2008
    Posts
    7
    Excellent site! After reading most of the the guides one near the bottom had what I'm looking for. TA Andy!

+ 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. chart disappears when I hide columns with values
    By mufan in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-11-2011, 12:09 PM
  2. Columns and (XY)Scatter in same chart
    By aderougemont in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 10-14-2008, 07:17 AM
  3. Modify a Function to add an extra condition
    By King_Quake in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2008, 04:32 PM
  4. Offset function
    By Sir08 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-26-2008, 01:12 PM
  5. Using a function to compare three columns
    By brainfreeze in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-19-2006, 06:38 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