Chart Series - Set Start / End Dynamically

Apr 16, 2014

The formula used to create the marked series line.

Code:
=SERIES(Rolling_window_data!$B$2;Rolling_window_data!$A$3:$A$122;Rolling_window_data!$B$3:$B$122;1)

The statistics in Rolling_window_data.

I need the marked line to be different from/to a point in time (x scale), depending on the backfill date in Rolling_window_data. All the contents are generated programmatically so the backfill date cell with a value will almost always be different. From what I've researched, I should make 2 series that overlap each other (in the current case, the 1st series should end on line 27 and the second should start from line 27 and continue to the end). The start is always line 3 and the end is always line 122.

How do I dynamically set the series start/end so I can make them overlap each other? I'm assuming I should add some kind of 'IF Statement' to the series code but I'm very new to excel formulas.

Code:
=SERIES(Rolling_window_data!$B$2;Rolling_window_data!$A$3:
IF(FOR Each Cell in Range("D3:D122") cell.value #N/A, Cell, "D122");Rolling_window_data!$B$3:$B$122;1)

View 2 Replies


ADVERTISEMENT

Dynamically Chart Series

Sep 18, 2008

I have calculated data (the column and row headings are calculated as well) similar to this for which I need to create an automatically updating chart.

******** language="JavaScript" ************************************************************************>Microsoft Excel - test.xlsm___Running: 12.0 : OS = (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutA1=
ABCDEF1 BalloonsFlagsCushionsPillowsStickers2Blue136013Red352104Green703245Yellow075056Orange558327White26073Sheet2
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.

The chart should update if the data is filtered; so if a user doesn't want to see the 'orange' row they can filter the data accordingly. There is a finite number of rows and columns in the range but sometimes there will be less data. I have tried to convert the data to a table and that works quite well except the legend keys persist: so if there is no data for pillows and stickers the legends still appear and have to be removed manually. Also, there seems to be a bug in Excel 2007 whereby the removal of a chart linked to table data causes a persistent error message to appear.
I know that I need to created a named range for the data series using OFFSET, and I have also read that I need to refresh this formula using VBA but I am now very confused and none of my attempts quite work.

View 9 Replies View Related

Dynamically Finding The Start Of Data Via VBA

May 3, 2007

1. start at home position (yup can be done )
2. select the whole column or row (again can be done )
3. scan through from 1 end to other to find the first non empty cell ???

i have a situation where i just want to copy data from another app open the sheet up and paste the data anywhere i want.

then have the macro find the 1st (or last) cell of any row or column and give me the cell reference.

I can for a for loop but going for 1 to the end of a column ?? and multiple that n times well something quicker can be done surely??

what i was thinking of was something like selecting a column then testing the column as a whole for a cell with something in it be it text space ( i takeit a cell with a space is non empty ie testing with isempty on such a cell would be false? ) or numbers.

View 9 Replies View Related

200 Series But Get (The Maximum Number Of Series Per Chart Is 255) Error Message

Aug 4, 2014

I run a large simulation experiment. I have a loop plotting data in excel of a user defined area. Because of the limit of 255 series I have allowed a maximum of 250 simulations (they all need to be plotted). But the length of each simulation is free. I know there is a limit of 32.000 data points in a graph and I have this as a condition too.

If I set the data range to 100 columns and 3000 rows the graph is produced when I plot by columns. (code below)

But if I set the data range to 250 columns and 1000 rows I get the above mentioned error message. Even though I only have 250 series.

After the data is plotted it is the code below that gets the error:

[Code] .....

View 1 Replies View Related

Line Chart - Remove Series Code But What If No Series Exists?

Dec 22, 2011

I have the following code:

Sub Macro5()
ActiveSheet.ChartObjects("Chart 243").Activate
ActiveSheet.ChartObjects("Chart 243").Activate
ActiveChart.SeriesCollection(1).Delete
ActiveChart.SeriesCollection(2).Delete
End Sub

However, if there is no SereisCollection(1) actually present in the chart I get an error. How can I work around this? I will need an IF statement I assume, just not sure what it will look like.

View 4 Replies View Related

Show Chart Data Series Labels On All Series. 2007

May 31, 2008

I just recently installed Excel 2007 and I would like to know if it's possible to change all data points of a chart at the same time. In Excel 2003, I would normally hold down shift while clicking on each of the data points to make a global change. However, it appears I cannot do that in 2007.

I would like to display each data point's series name. When I go to Layout on the Excel Ribbon, and click on "Data Labels", and click on "More Data Label Options", the actual Y-axis values are shown for each data point. However, I do not want this - I actually only want the Series Name, but when I uncheck "Value" and check "Series Name" instead (under "Label Contains"), it only changes it for one of the series. Is there a better way, instead of going through each and every single series to make this change?

View 4 Replies View Related

Spurious XY Scatter Chart Series Adding Series

Aug 21, 2006

The following code is supposed to produce six series on an xlXYScatter chart. It produces seven with the seventh series being a repeat of the sixth but named series 7.

Sub Chart2()

Dim DataRange As Range
Dim CellString As String 'Stores a cell range in the form "AA27:AB39"
Dim CurrentSeries As Integer
Dim SeasonCount As Integer

Worksheets("Hemisphere").ChartObjects(2).Activate

CurrentSeries = 1 ............

View 9 Replies View Related

Color Pivot Chart Series Dependant On Series Name

Jun 24, 2008

I have a list of data on one sheet and a 'reports' page on another sheet. The reports page has several pivot tables and a pivot chart. I want the pivot chart to format the bars on the chart relevant to the series name. The series names are "R" "A" amd "G" for Red Amber and Green respectively, I want the chart to change the colour of the series so that it is the correct colour ie. "R" would be coloured Red, "A" would be Amber and "G" would be green.

Sub PivotLoader()
Dim Red As Integer
Dim Amber As Integer
Dim Green As Integer
Red = Range("H9").Value
Amber = Range("H10").Value
Green = Range("H11").Value
Range("B8").Select
ActiveSheet.PivotTables("PivotTable4").PivotCache.Refresh
Range("D25").Select
ActiveWindow.SmallScroll Down:=18
Range("B49").Select...........................

View 2 Replies View Related

Chart - Second Series Starts Where First Series Ends?

Sep 21, 2011

I would like to have two series of data using the same X axis (date, formatted in months). The Y axis is in intervals of 100,000.

The first data series is historical (actual) data (i.e. Jan 2009 to August 2011). The second data series is forecast (Sept 2011 - August 2012). So i want the forecast series to start immediately after the historical series. It is a 'line with markers' chart. The key objective is that the forecast data looks visually distinct from the historial series.

Excel version: Excel 2010
OS: Windows 7

View 5 Replies View Related

Color Bar Chart Series Based On Series Name

May 15, 2008

I'm using the following code to set the colours of the slices of all the pie charts in my spreadsheet based on each slice's legend's label: ....

View 9 Replies View Related

Identifying Start And End Dates In A Series

Jul 11, 2007

i am trying to both identify the start date and the end date of a series in excel.

if you will, picture a spreadsheet with two rows with data. the top row is comprised of dates in mm/dd/yy (end of month) format. the bottom line is percentages . . . a corresponding % for each date directly above. these percentages add to 100%. in two separate formulas, I would like to identify:

1. the date in which the first %>0 occurs (start date)
2. the date in which the cumulative addition of all months %'s equate to 100% or the date in which the last %>0 occurs (end date)

keep in mind many if not most of the %'s will be 0%.

View 13 Replies View Related

Delete Series Through Its Start And End Number

May 3, 2009

I have different series number from column B to Q in Data Sheet, what I want is see strat and end range in temp sheet and delete(Shift xlup) numbers from Data Sheet from col a to q. If Series is like .....

View 9 Replies View Related

Adding Series Of Runtime To Start Time

Jul 27, 2014

I'm trying to create a spreadsheet for irrigation system program times. Each program has a start time, say 2 a.m. Multiple zones then run for varying times in a cycle. I need to add the run time to the start time to produce the next start time, and continue that through many zones. I can get the first few by simply formatting the cells as ##:## and using =F2+G2 (the start time is in F and the run time is in G) using 20 minute run time as a test. But when it gets to the third zone, my results show 2:60 a.m. and all results are incorrect from there on. Is there any way to do what I need in Excel?

View 2 Replies View Related

Chart Making- Chart With 3 Data Series

Jun 30, 2008

I have a chart with 3 data series. The series are located in columns A, B and C respectively. Series I is a general number anywhere from 0 to 100,000. Series 2 is also a number, but is is devided by series 1. So, if series 1 was 100,000 then series two would be 25,000/100,000 which is 0.25. Series three will always be numerator of series 2 or 25,000 in this example. The numerator, or the 25,000 will never change, so, in my example, series three will be a straight line across the chart because it is always 25,000.

In my example, the .25 is plotted on the left value axes, and series one is plotted on the right value acccess (secondary axis). Series three is just a line in the middle.

My problem is that sometimes the line, series 3, doesn't match the values in both the right and left values axes. So, if series one is 48,000, then series two would be 48,000/48,000 = 1, and series three would be 48000 - the straight line. The third series should be a line touching the 48,000 on the right and the number 1 on the left. It does touch the 48000 on the left, but is below the number 1 on the left.

View 9 Replies View Related

Change Chart Series Pasted From Another Chart

Jun 19, 2008

I want to use a macro to change attributes of a series in a chart. Unbelievably, if the series has been pasted into the chart from another chart, and although the macro can address the series and even return values (eg name) correctly, the selection simply cycles to one of the original series on the chart.

View 3 Replies View Related

Fill Number Series Based On Start / Stop Of 2 Cells

Jan 18, 2008

I have a excel sheet of data numbers which blongs a packet of inventory where i found number series like this:

Start Range End Range Qty
2101200 2101499 300

I have to draw this onto a series like 2101200 then 2101201 then 2010202 etc.
but some time these numbers are in qty 30000 or more. I have questions

1- If any macro colud fill series suppose if write number in A2 and qty in B2 so it reads the qty of b2 and fill the series in A. If i write 1 in A2 and write 50 in B2 so the series should be auto fill 1 to 50.

My Second question is opposit of my above question.

2- if i have different number series in column a and i want them to be as start number in column b and end number in column c and qty in column d based like mentioned below example.
Series [b]Start Range End Range Qty
1 1 1 1
3 3 3 1
5 5 7 3
6
7

View 8 Replies View Related

Change Chart Range Dynamically

Sep 24, 2006

I maintain Production data in an Excel Sheet and have the code which will create Chart for each Employee. Sample Sheet Attached. However, I want the Chart Range to be updated in a Single Chart and exported to a .Gif File.

View 2 Replies View Related

Dynamically Change How Values Are Displayed In A Chart

Dec 23, 2013

Is it possible to dynamically change how values are displayed in charts?

I have a list which references different named ranges. It either needs to display the values in a graph as a number (without decimals) or a percentage depending on the source. Is this possible? Maybe with some VBA? Or am I asking too much from excel?

View 4 Replies View Related

Dynamically Expand Range To Create Chart

Jan 21, 2009

See the attached example. I have data listed as shown, but need the chart to automatically update whenever a new sales figure is added to the next month. I know you have to use the OFFSET to create dynamic ranges but I can't get it to work horizontally, only if my data is laid out vertically.

View 2 Replies View Related

Chart Loop To Change Axes Dynamically

Oct 11, 2006

I've got an excel worksheet that contains charts 5-14, each with different max axes on primary and secondary scales. Right now the code below works to adjust the axes, however I have pasted this into a script 10 times, once for each chart with different references to the chart number, the max primary axis and max secondary axis. how I could write the following as a loop so that I don't need to have to repeat this routine in my code?

Sub ChartsBillingsShare()
ActiveSheet.ChartObjects("Chart 5").Activate
With ActiveChart
.HasAxis(xlValue, xlPrimary) = True
.HasAxis(xlValue, xlSecondary) = True
End With
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = 0
.MaximumScale = Range("Y6").Value
End With.................................

View 4 Replies View Related

Dynamically Update Chart Source Range

Aug 31, 2007

I'm trying to create a chart and set its source dynamically.

I've tried two methods, the first by setting the XValues of a chart's series collection to a range specified by cells,

ActiveChart.SeriesCollection(1).XValues = range(Cells(9, coloffset + 4), _
Cells(9 + numvsteps, coloffset + 4))

And by using the chart wizard.

Call vchart.Chart.ChartWizard( _
Sheets(resultssheet).range(Cells(9, coloffset + 6), Cells(9 + numvsteps, coloffset + 6)), _
xlLine, , xlColumns, _
Sheets(resultssheet).range(Cells(9, coloffset + 1), Cells(9 + numvsteps, coloffset + 1)), , _
False, "End-End Eff., " & current & "A", "Line Voltage", "Eff. [%]", "test")

Setting the XValues property gives an "Unable to set the XValues property of a series class".

Using the chart wizard, trying to set the category labels parameter of the chart wizard to a range doesn't give an error message, but does leave the category labels section of the chart (when I click and view it) blank.

I've also tried

resultssheet = "Sheet1"
tempstring = "='" & resultssheet & "'!" & "R9C" & (coloffset + 1) & ":R" & (9 + numvsteps) & "C" & (coloffset + 1)
ActiveChart.SeriesCollection(1).XValues = tempstring

When I step through the code, tempstring is "='LineReg Results'!R9C1:R19C1", which is correct, but I still get an "unable to set the xvalues property of a series class" error.

Interestingly, if I record a macro of me setting the category labels, and play it back, I also get the error.

View 7 Replies View Related

Add Dynamically Vertical Line To Chart Without User Intervention After Initial Setup Of Workbook?

Mar 21, 2014

I am trying to add a vertical line dynamically to a chart. What I mean is I have a chart that will have a line type chart on it and I want to add a vertical line to it based on the output of one cell in that same workbook. I am making this workbook for use by end-users so I can't ask the end-users to make a bunch of modifications to the sheet or or chart. What I do has to just work when they use the workbook.

The line chart has an X axis of time and a Y axis of items sorted. (This is the part of the chart I have done already.) I want to add a vertical line fed from a cell which will have a time fed from a cell on the workbook. For example the line chart goes from 9:00 to 16:00 and the vertical line might be at 13:00. The cell feeding the vertical line is subject to change based on the other inputs on the workbook so that's why I say the vertical line has to be dynamic as the vertical line could be anywhere between 9:00 to 16:00 or it might even be that I can't place the vertical line because the feeding cell is outside the range of 9:00 to 16:00.

I have seen a number of ways to do this but none that are dynamic and automatic and don't require end user to adjust the workbook to make the vertical line at the correct on the time scale.

View 2 Replies View Related

Start Chart At 12PM Rather Than 12AM

Apr 28, 2014

Under my pivot chart, It shows hours 0 to 23 hundred (for time). Can I start the graph to go from 12 to 11

Not - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

I want - 12 13 14 15 16 17 18 19 20 21 22 23 0 1 2 3 4 5 6 7 8 9 10 11

View 5 Replies View Related

Unique Start And End Dates For Chart

Jan 12, 2008

I have searched for a 'simple' solution to this but I only ever seem to find complex and indepth examples.

I summarise web hit information then chart it so I can look for trendlines. I get good info from the stat company so I can see where folk are coming from, search engine, weblink etc etc.

Once I have summarized it I have date running along the column headers then it is broken down through the rows so I have

Total Hits
Total Paid Advertising
Total Search Engine

And so on for my rows

As the days go on the data gets harder and harder to read so I was hoping I could use some kind of OFFSET function to select my data. So if my dates run from 2/11/07 to today I would like to perhaps say to Excel that I might want to see 20/11/07 to 20/12/07 in my chart.

I have plenty space to put the start and end date and I have a basic block of data.

View 9 Replies View Related

Chart: Secondary Axis To Start At 0 Instead Of Min Value

Jul 29, 2009

where i can fix the secondary value axis to start at 0 instead of starting from minimum value like usual?

like the min value of my value axis is -12, the secondary axis will follow suit, i. e 0% will start at -12. i want it to start at 0 instead.

View 9 Replies View Related

Force Chart Axis To Start At

Dec 4, 2006

to get this Break Even Analysis chart to start at zero.

I took one that looks the way I want it (on the left)
and tried to re-create it on the right....

the charting is starting at 1 and I need it to start at 0 like the one on the left does..... Not sure what needs to be changed to make the one on the right look just like the one on the left.

View 3 Replies View Related

Use VBA Variable In Chart Series

Oct 2, 2012

I'm attempting to create a dynamically built donut chart using VBA, but I'm having trouble inserting a variable to be used as one of the values.

The chart graphs 3 data points:
ASC GP - Located in cell T4
ACC GP - Located in cell AE4
ACT GP - variable called LocSumActGP

The code snippet I assumed would work looked like this:

Code:
.SeriesCollection(1).Values = "='Location Summary'!$T$4,'Location Summary'!$AE$4," & LocSumActGP

But it doesn't seem to like that.

View 2 Replies View Related

Adding A 2nd And 3rd Series Onto A Chart

Jan 24, 2007

I have the following code which puts a series onto a chart

With Charts("Test Chart")
.SetSourceData Source:=Sheets("Data").Range("A1:B" & Nreadings), PlotBy:=xlColumns
.Axes(xlCategory).MinimumScale = 1
.Axes(xlCategory).MaximumScale = Nteeth
.Axes(xlValue).MinimumScale = Miny
.Axes(xlValue).MaximumScale = Maxy
End With

I would like to add a 2nd or third series onto the same chart using the same scale etc. How do I do this in VBA code? Whenever I add another line to add a series it just overwrites the first series I have shown here.

View 9 Replies View Related

Each Chart Source Row As A New Series

Dec 13, 2006

my problem is:

I have a whole list of data which changes according to the users preferences
It comprises of a NAME, X Value, and Y Value and the addition of X and Y. (these all have auto filters on them)

The user inputs under these fields, as many rows as they wish (which will be around 20ish)

I want it so when i click a button "CREATE GRAPH"

it selects the highest 10 values (if there is 10 values, if not then all the values) from the 4th column (X+Y) and then creates a graph. i want each row to be a new series...

View 9 Replies View Related

Scale Chart Series To MIN & MAX

Sep 26, 2007

I have a Scatter chart that plots a simple XYScatter plot. The data for this plot can be very wide ranging, and for that reason, I use AutoScaling to scale the axes. Nine times out of ten, it works just fine, but it seems that when the X data ranges from about 5200 to 7200 +/-, the autoscaling does not calculate well (example attached).

Autoscale range will go from 0 to 8000, leaving a large area of unplotted graph space.

I thought the original issue was that I may be plotting zeros or blanks, but I've eliminated that problem. I have yet to find another range of values that causes it, but I'm sure there's some. What is it about the way that Excel calculates its AutoScaling that I'm missing?

What do you all recommend to eliminate this problem? Manually scaling it is not really an option in this case, as I want this to be completely transparent to the user for ANY range of data.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved