I am trying to create a dynamic graph that checks which financial year it is and then only graph the data for that range of months.
I have a 'SUMMARY DATA' sheet that has rows with the date range 1/7/18 || 31/7/18 and so on for every month. I am trying to create a dynamic range that takes these values and then have the graph use those cell references.
Currently I am using a fancy concatenate function that gives me 'SUMMARY DATA'!$H$25:$H$36 (In cell DASHBOARD!$AJ$24) which is the range that I want to reference. I can't seem to get this working with a graph though. If I place =DASHBOARD!$AJ$24 as the series values, the graph doesn't update with the correct values (just 0 for every column). If I try using =INDIRECT(DASHBOARD!$AJ$24), it gives me a "That function isn't valid" error.
Not sure how to progress
First, create a named range (Formulas, Defined Names, Name Manager) called cdata with a Refers to: of,
=indirect(DASHBOARD!$AJ$24)
Now use =Dashboard!cdata as the chart data source.
Be advised that these series data references are resolved; they do not stay dynamic. i.e. changing the reference in DASHBOARD!$AJ$24 does not automatically alter the chart data.
Related
I have a table with, say, 3 rows and 3 columns, the first one being the date and the other two being random data such as below (data start in A1):
I have created the first named range as 'Date' for A2:A4 and the second named rage as 'Data' for B2:C4.
I wish to plot Series1 using the named range. Of course, I could simply plot Series1 manually with a fixed range, but that does not fit what I need to do.
Most of the documentation I found either refers to single-column named range or does not address the issue of plotting. The closest reply to my question is found here but Excel returns an error when I insert my formula for the plot. Excel returns "This function is incorrect" when I insert =INDEX(Sheet1!Data,,1) in the series values, though this works outside of the charting environment.
My question is therefore: can I use a named range with more than one column when charting and, if so, how do I reference the Nth column?
EDIT: In my broader use case, the range is dynamic and is defined as =OFFSET($B$1,0,0,COUNT($B:$B)-1). Any solution for plotting should therefore remain purely dynamic.
As you've discovered, you can't use INDEX() in the chart range properties. There is a bit of a way round what you want though. If you use the same formula =INDEX(Sheet1!Data,,1) in an empty column, then you can then chart that range instead.
You can even then link the column number to another cell, making it dynamic:
You can also do a similar thing with the series name, although it would perhaps be easier just to extend the data named range to include the header.
I have a chart in Excel 2010, and I want to have a data series that can refer to multiple named ranges based on criteria in another cell. For example, if A1 = 1, the data series will display the data from S_1, and if A1 = 2 it will display the data from X_1. Both S_1 and X_1 are dynamic, and can refer to different data based on other conditions I have.
I've gone into the select data source of the chart, and tried setting the series value of the data series equal to formulas like IF(A1 = 1, S_1, X_1), and CHOOSE(A1,S_1,X_1), but it says these functions aren't valid.
Is the syntax of the formula off, or does excel not accept these formulas in its series value? If it's the latter, what other way is there to achieve the desired result?
I would use another column (could be hidden) to extract the specific data I want to plot.
First, you'll need a list, or some other way to interpret the number in A1 to the specific series you want to show. Than you create a column (for simplicity I assume it is aligned with your data) that fetch the relevant data from the table, and set the chart on it.
Now, step by step:
Define the mapping between the number in A1 and the data series you want to choose. I'll use it as the column number of the data.
Define all the data range as a named range, say data.
Take a new column, and paste this formula in row 1:=INDEX(data,1,$A$1), This will bring the header.
In the cell below type: =IF(ISBLANK(INDEX(data,0,$A$1)),NA(),INDEX(data,0,$A$1)) to bring the data from the relevant series, or #N/A if it's blank.
Drag the 2nd formula all the way down to the lowest row in which any of the series has data in it.
Create a chart based on the new column, and watch how you can chang the value in A1 and see the chart updates.
Tell me if it answers your question ;)
I have already made charts and would like to make it dynamic so that when I add new data (highlighted yellow) the charts will update automatically.
Can someone guide me on how to do this.
Image of sample data for what I am trying to do is attached.
I would advise the use of named formulas for your series data inputs. Your named formulas can be dynamic in nature, in that they search across the row and check for the first blank row of data.
As an example, all the grapsh can have their horizontal axis labels set to the named formula 'validDates', where
validDates is put in the name manager as :
='NTesco'!$C$2:INDEX('NTesco'!$2:$2, MIN(IF('NTesco'!$B$3:$AZZ$3="", COLUMN('NTesco'!$B$3:$AZZ$3), 99999)))
N.B. You could use slightly different variations for each graphs date range if there will be independent data gathering for each corresponding value range. Then you should use that row's row index in the IF logical test argument...
You could also use a formula for the first graph values, such as:
='NTesco'!$C$3:INDEX('NTesco'!$3:$3, MIN(IF('NTesco'!$B$3:$AZZ$3="", COLUMN('NTesco'!$B$3:$AZZ$3), 99999)))
The AIOWHB graph takes values from the 4th row, so would be:
='NTesco'!$C$4:INDEX('NTesco'!$4:$4, MIN(IF('NTesco'!$B$4:$AZZ$4="", COLUMN('NTesco'!$B$4:$AZZ$4), 99999)))
And so on for the other two....
I am trying to build a chart which dynamically updates the series' selected based on user-defined selections from a drop-down menu.
Purpose is to create chart which displays n-series of data based on n-selections, e.g.
=Output!$P$36:OFFSET(Output!$O$35,IF(Output!$C$4="RANK",COUNT(Output!$S$34:$S$38),COUNT(Output!$S$34:$S$38)+3),COUNTA(Output!$P$35:$W$35))
The named range dynamically updates the chart area (i.e. row labels, column labels and data range). I reference it correctly i.e. as ='filename.xlsm'!named_range_here in the "Chart Data Range" section.
When I do this, the Chart Data Range resets itself [help]
How can I tell excel to stop showing blank series (e.g. 2 blank series of 5 when i want it to display the 3 series which have values) [ideas please]
When you apply a Name to the entire chart source data range, it is converted into its address. To keep dynamic Names, you need to define a Name for each distinct X and Y value range, and insert these into the respective series formulas.
If you're not shy about VBA, you can still make it work, following the approach in my tutorial Dynamic Chart Source Data.
I'm struggling to find a solution to something I thought would have been simple.
In a separate app, I'm copying an Excel workbook, running a bunch of database queries and dumping the result into the newly copied workbook, giving each result a defined name (named range).
In the Excel 'template' (it's not a real template, just a workbook being copied) there are, on another worksheet, some charts that reference the named ranges.
When I originally built the 'template' I simply inserted a chart and typed the named range in as the data source from the 'Select Data' option. The chart looked fine...
The problem is that the app that dumps the data into Excel won't always put the named ranges in the same location and the chart appears to be looking for a specific range of cells referenced (e.g. =CategoryData!$A$23:$B$29 rather than simply =nrCategoryTotals which is the named range I originally typed. ).
So the question is... Is there anyway I can get the chart to always point to the named range, even if the named range is created in a different location with the following conditions:
1. No user interaction (I realise manually moving a named range does not have this problem as Excel handles the updates)
2. The location and size of the named range will vary, only the sheet it appears on is consistent
I hope that made sense?
Al.
You need to specify a named range for X values and Y values. You could define two dummy named ranges that point to the first column and second column of your named range.
For example:
X values "Named range" nrCategoryTotalsX: =OFFSET(nrCategoryTotals, 0, 0, ,1)
Y values "Named range" nrCategoryTotalsY: =OFFSET(nrCategoryTotals, 0, 1, ,1)
Then you just need to define your graph with the formula:
=SERIES(,CategoryData!nrCategoryTotalsX,CategoryData!nrCategoryTotalsY,1)
Bear in mind that in this example named ranges are created within scope of CategoryData worksheet.