+ Reply to Thread
Results 1 to 6 of 6

Fixed size dynamic range for chart

  1. #1
    Registered User
    Join Date
    04-21-2015
    Location
    Serbia
    MS-Off Ver
    Office 365 64-bit
    Posts
    5

    Fixed size dynamic range for chart

    Hello all. I am trying to create data range used in chart that needs to be of fixed size but moving as we add rows to table.

    So in the picture I have range of 3 rows

    Range1.JPG

    And as I add new data it should move down but remain height of 3 rows

    Range2.JPG

    I've been trying with OFFSET and COUNTA but getting error when using COUNTA as row reference in OFFSET command (I hope I am clear on this)

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2016 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    30,525

    Re: Fixed size dynamic range for chart

    Why not just make your table into a proper Excel table?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Registered User
    Join Date
    04-21-2015
    Location
    Serbia
    MS-Off Ver
    Office 365 64-bit
    Posts
    5

    Re: Fixed size dynamic range for chart

    This is just exercise example although Spreadsheet I've received at work is also not formatted as table but we can convert it of course if it would help.
    Haven't used Excel in probably 10 years, just started with some courses so apologies if I miss something obvious in my posts

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2016 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    30,525

    Re: Fixed size dynamic range for chart

    OK - attach a sample workbook.

    Are you saying that you always wish to reference the last three months?

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003, 2007, 2010 & 2013
    Posts
    18,466

    Re: Fixed size dynamic range for chart

    Set up 4 named ranges

    LABELS =OFFSET(Sheet1!$A$2,COUNTA(Sheet1!$A:$A)-3,0,3,1)
    DATASET1 =OFFSET(LABELS,0,1)
    DATASET2 =OFFSET(LABELS,0,2)
    DATASET3 =OFFSET(LABELS,0,3)

    Update chart series formula to use named ranges.


    Example attached
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  6. #6
    Registered User
    Join Date
    04-21-2015
    Location
    Serbia
    MS-Off Ver
    Office 365 64-bit
    Posts
    5

    Re: Fixed size dynamic range for chart

    Thank you both for extremelly quick replies.

    [at] Andy
    Many thanks, this is what I was trying to achieve

+ 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