#1
|
|||
|
|||
Chart with Dynamic Array
We recently changed to Excel (Office) 365. I've been tasked with creating a template for a series of line charts that will be based on dynamic arrays. I watched some excellent tutorials online, but I'm having a problem getting the chart to accept the input of a dynamic array. I started by converting my data into a table. I tried using an Index (Match): Index(Match) formula to select the rows between two mileposts (numbers) that can be chosen with two data validation dropdowns. Milepost will be my horizontal axis; there will be anywhere from 4 to 10 columns of data that will be plotted. 365 shows me spilled results that are correct. But when I attempt to make that array formula a named range in Name Manager, and then use that Name in my horizontal access, I get "there's an error in the formula you entered." =INDEX(Milepost,MATCH(hma_Data!$P$2,Milepost,0)):I NDEX(Milepost,MATCH(hma_Data!$P$3,Milepost,0)) I see that it's replaced selected range (hma_Data!$A$2:$A$500) to the named range "Milepost." I watched another video that seemed to based the chart on the actual spill array, by selecting the cell where the spill started, and using that cell location ($R$2 in my case) with the # sign. I made this a named range. The chart will not accept that named range either, nor the direct formula of R2#. I feel like I'm missing the smallest most obvious thing to get it to 'stick' in the chart. Blindspot! Thanks for any suggestions, Ann |
#2
|
|||
|
|||
A foolproof way to define dynamic named ranges is to use OFFSET().
E.g. Code:
=OFFSET(AnchorPoint, RowsDown, ColumnsRight, NumberOfRows, NumberOfColumns) AnchorPoint is address of some single cell which you are sure it will never be deleted, and is above or in same row as the range you want to define, and left or in same column as the range you want to define; RowsDown is the number of rows from AnchorPoint to topmost row of range you want to define; ColumnsRight is the number of columns from AnchorPoint to leftmost column of range you want to define; NumberOfRows is the number of rows you want in defined range; NumberOfColumns is the number of columns you want in defined range. E.g. you want to define a range P5:P1, anchored to cell P1: Code:
=OFFSET($P$1,4,,6,1) To get any detailed help you have to attach some example table here. |
#3
|
|||
|
|||
Quote:
My trouble was getting the chart to "read" or accept the named range. Finally tried making all of the named ranges under the scope "Worksheet" rather than the default, "Workbook." And with that, the chart is finally working properly. I'm going to go back and try again, creating the named ranges on "Workbook" scope but apparently the one thing that maybe I was missing initially was ='SHEETNAME'! before my named range in the chart. I could have sworn the example I watched on a video didn't have that detail. Thank you, Ann |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a dynamic array for some formulas | Bumba | Excel | 2 | 01-27-2019 05:10 AM |
Fixing legend of a dynamic chart | Toonook | Excel | 0 | 08-25-2016 04:46 PM |
Dynamic chart ranges | GlowingApple | Excel | 1 | 02-17-2016 07:18 PM |
Generating a chart with dynamic series | Officer_Bierschnitt | Excel | 3 | 10-15-2015 12:30 AM |
Dynamic Chart with Non Continuous data | swati_04 | Excel | 0 | 03-02-2015 12:06 AM |