+ Reply to Thread
Results 1 to 4 of 4

Help with dynamic data and chart

  1. #1
    Registered User
    Join Date
    08-05-2020
    Location
    USA
    MS-Off Ver
    MS Excel 2016
    Posts
    3

    Help with dynamic data and chart

    Hi all! I have a two-level (two-column) range to populate horizontal axis in chart. Months in column A and 3 categories for each month in column B. I want to be able to make the two-level range a dynamic range to auto-populate the chart each month, and used the offset/counta combination formula to define the range as follows (=OFFSET('Sheet1'!$A$8,0,0,MAX(COUNTA('sheet1'!$A$8:$A$41),COUNTA('sheet1'!$A$8:$B$41),2)) since there are blanks in the month column. The trouble I am running into is when using the define name to populate the horizontal axis in the chart, it only populates the months and omits the 3 categories. What is the best solution to fix this so that the chart correctly populates the two-level axis?

    I tried converting the data to a table, and unfortunately, it does not auto-populate the chart as expected so I used the offset formulate as the only other option.

    Thanks in advance

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Help with dynamic data and chart

    You can use this named range for the Category labels

    =OFFSET(Sheet1!$A$8,0,0,COUNTA(Sheet1!$B$8:$B$41),2)

    It does assume that there are no gaps in the inner layer of labels.

    Also there is a table linked chart that appears to be working.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-05-2020
    Location
    USA
    MS-Off Ver
    MS Excel 2016
    Posts
    3
    Quote Originally Posted by Andy Pope View Post
    You can use this named range for the Category labels

    =OFFSET(Sheet1!$A$8,0,0,COUNTA(Sheet1!$B$8:$B$41),2)

    It does assume that there are no gaps in the inner layer of labels.

    Also there is a table linked chart that appears to be working.
    Thank you for your response! I ended up switching the formula to INDEX instead of OFFSET to keep the worksheet from getting slow from all the recalculations (especially with all the charts and formulas to keep them dynamic). For the original question, is there an option using INDEX instead OFFSET?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Help with dynamic data and chart

    Confused, if you have switched to using INDEX what is stopping you applying it to the range for category labels?

+ 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. [SOLVED] Dynamic Data for a Static Chart
    By jstawski in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-21-2018, 03:56 PM
  2. Dynamic Chart Data not Updating
    By MVictorH in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-15-2015, 03:23 AM
  3. [SOLVED] Box chart for dynamic data
    By Sai Prashanth in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-18-2014, 01:38 PM
  4. Dynamic Chart Data
    By jj1982 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-26-2014, 08:22 AM
  5. Chart with dynamic data in a row, account valid data only when building chart
    By artmak in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-05-2014, 02:21 PM
  6. Dynamic Chart for data
    By pankaj2610 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 02-03-2014, 09:46 AM
  7. How to create a dynamic chart off dynamic data
    By jananas in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-07-2013, 10:48 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