+ Reply to Thread
Results 1 to 6 of 6

Dynamically Expand Range to Create Chart

  1. #1
    Registered User
    Join Date
    08-07-2008
    Location
    London
    Posts
    29

    Dynamically Expand Range to Create Chart

    Dear all

    Please see the attached example.

    I have data listed as shown, but need the chart to automatically update whenever a new sales figure is added to the next month.

    I know you have to use the OFFSET to create dynamic ranges but I can't get it to work horizontally, only if my data is laid out vertically.

    Please can you help?

    Thanks

    Alis
    Attached Files Attached Files
    Last edited by alis88; 01-21-2009 at 10:20 AM.

  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,454
    Hi,
    Your data range can be defined like this:

    =OFFSET(Sheet1!$B$3,0,0,1,COUNTA(Sheet1!$B$3:$AA$3))

    And the labels like this

    =OFFSET(Sheet1!$B$2,0,0,1,COUNTA(Sheet1!$B$2:$AA$2))

    Please see attachment
    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
    08-07-2008
    Location
    London
    Posts
    29
    Thank you so much!

    Alis

  4. #4
    Registered User
    Join Date
    07-04-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    1

    Re: Dynamically Expand Range to Create Chart

    Quote Originally Posted by sweep View Post
    Hi,
    Your data range can be defined like this:

    =OFFSET(Sheet1!$B$3,0,0,1,COUNTA(Sheet1!$B$3:$AA$3))

    And the labels like this

    =OFFSET(Sheet1!$B$2,0,0,1,COUNTA(Sheet1!$B$2:$AA$2))

    Please see attachment
    Hey there, Well I am a beginner so this question might seem stupid...I downloaded the excel shet but could not find this formula...where do you set or enter it?
    thanks in advance...

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Dynamically Expand Range to Create Chart

    Hello & Welcome to the Board,

    Look in the name manager...these are named ranges

    One is called months and the other sales
    HTH
    Regards, Jeff

  6. #6
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: Dynamically Expand Range to Create Chart

    Quote Originally Posted by shawn22 View Post
    Hey there, Well I am a beginner so this question might seem stupid...I downloaded the excel shet but could not find this formula...where do you set or enter it?
    thanks in advance...
    There is no formula anywhere. The idea was to use named ranges, and in the reference to the named ranges is where you use the formulas provided. Then you edit the data series of the chart to refer to the dynamic named ranges.

    The attached does not fully reflect that as Sweep probably wanted to leave some fun for the OP. The named ranges for Months included up column K as well, so I corrected that and included up col AA similar to the sales range.
    Attached Files Attached Files
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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