excel Blank on the right side of graph - excel

I was looking for a similar problems, but couldn't find an answer to this issue. I have a huge blank space on the side of my graph.
I cant change the axis setting because my graph auto updates when new data is entered. I have also cleaned the table, so there is no empty data in the table.
my graph

That means your Axis labels or Series values are derived by a formula. In order to deal with the scenario, create two dynamic named ranges and use them as series for the chart.
Assuming your axis labels are in column B, create a named range using the formula given below...
=OFFSET(Sheet1!$B$2,,,COUNTIF(Sheet1!$B:$B,"?*")-1)
Same way create another named range to hold the series values.
And then right click the chart --> choose Select Data --> select the series and the axis label one by one --> Edit --> And in the series values or in the axis label range, use the relevant named range using the formula given below..
Sheet1!YourNameRangeForAxisLabel
Sheet1!YourNameRangeForSeriesValues
Here Sheet1 is the sheet which the named ranges belong to.
Later this would be changed automatically and reflect the workbook reference correctly.

Related

How does one bias plotted data, to line up multiple series of data without modifying the input data?

I am trying to change a data series from a formula like =SHEET!$L$500:$L$750 to =(SHEET!$L$500:$L$750)+120 and Excel is refusing to allow this.
How can I achieve this offset (or bias) of 120 degrees to this data series, and consequently subtract 120 degrees to another set on the same plot - without modifying the input data or adding extra columns?
Series formulas don't allow calculations. If you don't want to use a helper column in the worksheet, you can set up a named formula with the Name Manager in the Formulas ribbon.
Create a new name, for example "ModifiedSeries" and use the formula you had above. In my screenshot, I used
=(Sheet1!$B$3:$B$10)+3
Then add a series (or edit the existing one), and instead of the range in the Series values, enter the name you just created. Note that it must be preceded by the sheet name, otherwise Excel will not allow it. To quickly write the sheet name, type a = sign, then click any cell in the sheet and use the backspace key to remove the cell reference, then type the name you used or pick it with F3.
In my screenshot, I added a new series with the named formula in addition to the existing series, so you can see the difference.
Instead of hard-coding the value to add to the original series data, you can make it more dynamic by pointing to a cell. In this animated screenshot, the name has the formula
=(Sheet1!$B$3:$B$10)+Sheet1!$B$13

Making a dynamic column line graph

I am trying to create a graph where the number of columns varies. what I have done is used name manager to label each of the possible columns (1-100). I have then used these named ranges to create a graph.
Each column in the table should be identified as a series, the issue is that I do not know how to change the number of series automatically, so that when data is added to the column the chart automatically added the series in. I tried to do this by naming the range as a table, this also did not work as it included the empty columns as series on the chart.
the data I am trying to use is as follows;
When I add data to another column I want to add that series to the graph. Is there a way of doing this? because all I have been able to find are examples where the number of rows are the only thing that is dynamic.

How to make an existing chart dynamic

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....

Using named "Chart Data Ranges"

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.

Dynamic XY scatter chart

I am trying to create a dynamic XY scatter chart. Basically the chart is based on two columns. The first is the client name and the second a number which I want to plot on the XY scatter graph. The client name will be in the legend entry and the horizontal access will contain the value.
What I need however is a dynamic chart that changes based on the number of clients I have. The problem I have is that because the legend series is the one that changes I can't use a named range and if I put it in the Chart data range it changes to the exact reference. Any ideas would be appreciated
You can use a macro in your Worksheet_Change event to dynamically update a named range using Range('First Cell of the Data Range').CurrentRegion

Resources