Dynamic data chart in x and y axis - excel

I'm developing raport generator with fixed data range.
My row and column number vary from 'A34' to 'V64'. Each active column have same amount of rows. Active columns are placed next to each other, from left hand side to the right.
Things I've tried:
Chart from table but it does not look good as chart is full-sized no matter of data amount.
Macro record
VBA but I'm stuck after dynamic range on X-axis
Unfortunatelly I cannot post images yet but below is example data, blue represents possible data range
http://oi63.tinypic.com/21zp5d [dot] jpg
Thanks and have good day

Solution is finding data range and exporting that into chart, using VBA.
Start at C34
-Go to the right till you find first empty cell
-Go to the bottom till you find first empty cell
Now you can work on x,y coordinates and create your data range.
But I'm still open to new ideas

Related

How can I get my Excel spill range to be grouped by a specific column for a chart?

I need to produce a chart in Excel to show a quantity of items for a number of categories, grouped by the month they were received. At the moment, every occurrence of the Month shows up in my clustered column chart. I can manually do a table and remove all except the first occurrence of each month, but I need it to be done dynamically as the date range can be changed (between 1 and 12 months). I have a full list of data for 12 months, showing Types and their Quantity received. I've filtered the list to just show the types and quantities received between the date range selected (picture 1).
The three images below show the spilled data, the current chart, and how I would like the chart to look. If it cannot be achieved directly using a spill range, then could anyone suggest another approach to have my data dynamically displayed in a chart, grouped by month?
Not a perfect answer but here's a start:
You could paste:
=IF(COUNTIF(F$5:F5,F5)=1, F5,"")
in J5, and drag this down a sufficient way to cover the expected length of the dynamic array.
Then paste:
=CHOOSECOLS(F5#,2,3)
in K5, and use these three columns for your graph data.
I can't think of a way to make the "J" column dynamic at the moment.
EDIT:
Pasting:
=XLOOKUP(ROW(F5#), XMATCH(UNIQUE(CHOOSECOLS(F5#,1)),CHOOSECOLS(F5#,1))+4, UNIQUE(CHOOSECOLS(F5#,1)),"")
in J5 should work dynamically too.

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

Is it possible to get an excel chart with possibility to select the graphs to display?

I have several data in excel sheet and I wonder if its possible (through macros or something else) to select the data and display the series needed.
I'm not quite sure if I explained the situation correctly...
But I have multiple curves, and instead of plot the average curve or single curves, I would like to have the option to plot: curve 1, curve 2, curve 3, average curve...
Kind regards,
DNA
My preferred way to do this is with a combination of a couple of ideas. In general, Excel charts are easiest to maintain if they are looking at a simple range instead of complicated named ranges. Given this, I like to create a simple column of data for the chart and then use other Excel features to modify that column of data.
Note that the steps below are for a specific case of a block of data all on one sheet. There are a ton of variations that you can do to make this work for other configurations. The idea is simple: create a new column of data for the chart and use normal formulas to get the data there. You can make the x-axis a selector as well.
For the simple case of a common x-axis with varying series for the y-axis all in one block of data, I do these steps:
Start = block of data
Add a column header off to the side which will "drive" the selection. I like to make this a Data Validation drop down so that the selection is correct. I did this in G2, selecting the column headers as the Source.
With this in place, you can use the selection there to update the data in the column below it. A simple formula for doing this uses INDEX.
Formula in G3, copied down to end of data: =INDEX($C$3:$E$25,,MATCH($G$2,$C$2:$E$2,0))
This formula works by finding the column name in the list of column headers and returning that column of data. Since the row selection is blank ,,, it relies on the relative position of the cell which works since everything is lined up.
Once this is done, you can then create the chart simply using the date and the new column of data. It will respond to changes in the selector which works nicely. If you use the column G header as the series name, that will update too which is a good effect for free. Below is the chart showing the ranges it is using.

List of number of values in a range (Google Spreadsheets or Excel)

I asked a similar question a little while ago. I was basically just learning how to count the number of recurrences of a string in a range (using =COUNTIF()). I am now doing a very similar task, but I think it will be much more complex to solve.
So say for example I have a data set:
Gnar
Gnar
Anivia
Gnar
Sejuani
Malzahar
Malzahar
Malzahara
Sejuani
Gnar
(Yes I am doing a stats sheet for me and my team for League of Legends)
So I would like to ultimately have a pie chart or something with my percentage play of each champ (this will be a huge data set of 100's of games per year)
How can I have a pie chart or some other chart that shows the number of times each separate string appears in a range without me already having put it in.
If you need any clarification let me know!
Thanks,
William
PivotTables and PivotCharts will be your friends on this one...
Place those names in a column, let's say column A. It would be wise to insert a row header, I used Title in the my example.
Select the range, and do Insert > PivotTable. Once the PivotTable is created, drag Title (or whatever you named the header) down to Row Labels. Next drag Title again the Values section. Icing on the cake would be drag Title yet again, to Values and then click the second count column created in the PivotTable and elect for Show Values As > % of Column Total.
If you just want a bar chart, you can remove the percent column, click on the Pivot Table, and hit ALT+F1 to create a PivotChart. Although, you will probably want to apply some cleanup formatting to get the final result below.

Ignore cells on Excel line graph

I am trying to draw a line graph in Excel 2010. The y column data source has some gaps in it and I want these to be ignored for the graph. Seems to default these to zero. I know the "Hidden and Empty Cell Settings" exists, but this is only giving the option to set it to zero. Any other way to get my graph looking the way I want it
Image available once I have enough reputation!
if the data is the result of a formula, then it will never be empty (even if you set it to ""), as having a formula is not the same as an empty cell
There are 2 methods, depending on how static the data is.
The easiest fix is to clear the cells that return empty strings, but that means you will have to fix things if data changes
the other fix involves a little editing of the formula, so instead of setting it equal to "", you set it equal to NA().
For example, if you have =IF(A1=0,"",B1/A1), you would change that to =IF(A1=0,NA(),B1/A1).
This will create the gaps you desire, and will also reflect updates to the data so you don't have to keep fixing it every time
In Excel 2007 you have the option to show empty cells as gaps, zero or connect data points with a line (I assume it's similar for Excel 2010):
If none of these are optimal and you have a "chunk" of data points (or even single ones) missing, you can group-and-hide them, which will remove them from the chart.
Before hiding:
After hiding:
In the value or values you want to separate, enter the =NA() formula. This will appear that the value is skipped but the preceding and following data points will be joined by the series line.
Enter the data you want to skip in the same location as the original (row or column) but add it as a new series. Add the new series to your chart.
Format the new data point to match the original series format (color, shape, etc.). It will appear as though the data point was just skipped in the original series but will still show on your chart if you want to label it or add a callout.
There are many cases in which gaps are desired in a chart.
I am currently trying to make a plot of flow rate in a heating system vs. the time of day. I have data for two months. I want to plot only vs. the time of day from 00:00 to 23:59, which causes lines to be drawn between 23:59 and 00:01 of the next day which extend across the chart and disturb the otherwise regular daily variation.
Using the NA() formula (in German NV()) causes Excel to ignore the cells, but instead the previous and following points are simply connected, which has the same problem with lines across the chart.
The only solution I have been able to find is to delete the formulas from the cells which should create the gaps.
Using an IF formula with "" as its value for the gaps makes Excel interpret the X-values as string labels (shudder) for the chart instead of numbers (and makes me swear about the people who wrote that requirement).
Not for blanks in the middle of a range, but this works for a complex chart from a start date until infinity (ie no need to adjust the chart's data source each time informatiom is added), without showing any lines for dates that have not yet been entered. As you add dates and data to the spreadsheet, the chart expands. Without it, the chart has a brain hemorrhage.
So, to count a complex range of conditions over an extended period of time but only if the date of the events is not blank :
=IF($B6<>"",(COUNTIF($O6:$O6,Q$5)),"") returns “#N/A” if there is no date in column B.
In other words, "count apples or oranges or whatever in column O (as determined by what is in Q5) but only if column B (the dates) is not blank". By returning “#N/A”, the chart will skip the "blank" rows (blank as in a zero value or rather "#N/A").
From that table of returned values you can make a chart from a date in the past to infinity

Resources