+ Reply to Thread
Results 1 to 3 of 3

Creating a chart that selects a range of data that is dependent on a value selected

  1. #1
    Registered User
    Join Date
    10-03-2012
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Creating a chart that selects a range of data that is dependent on a value selected

    In the attached spreadsheet I am trying to create a line chart that is dependent on the month selected by the user of the spreadsheet.

    In column B I have a series of values, in column A I have months. The start of the chart will always be the first month but the end of the chart will depend on the month selected by the user. So if for example someone selects December 2010, I would only want the chart to display the line chart showing the values from cells B1 to B13. I have tried looking at offset functions but I haven't managed to crack it!

    Any help would be very much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Creating a chart that selects a range of data that is dependent on a value selected

    Hi,

    First, create some named ranges:

    chart_data =OFFSET(chart_months,0,1)
    chart_months =INDEX(months,1):INDEX(months,MATCH(Sheet1!$D$1,months,0))
    data =Sheet1!$B$1:$B$25
    months =Sheet1!$A$1:$A$25

    In D1, enter one of the months from your list (a data validation might be a good idea)

    then create a chart that has data values as =Sheet1!chart_data and labels =Sheet1!chart_months
    Attached Files Attached Files
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    10-03-2012
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Creating a chart that selects a range of data that is dependent on a value selected

    Thank you very much Sweep, that's really helpful.

+ 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. Replies: 11
    Last Post: 12-18-2014, 04:51 PM
  2. Creating a macro which selects and plots data across multiple worksheets
    By samthony in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-25-2014, 06:26 AM
  3. Automate chart range dependent upon data present
    By satkin2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2013, 07:42 AM
  4. Replies: 2
    Last Post: 06-11-2013, 12:37 PM
  5. [SOLVED] HIghlighted range dependent on month selected
    By orozvik in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2013, 01:45 PM

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