How To Get Index (number) Of Series Collection Selected In Activechart

Jul 25, 2012

How to get the index number of a seriescollection within the activechart user has selected .

I am able access the chart selected by the user by using the activechart function, but next i am trying to access the seriescollection selected by the user, in other words the activeseriescollection thing.

Is there any way to access the active seriescollection of an activechart or any other way to access the seriescollecion of a chart selected by a user.
I googled a lot but what i found that we have give the index no. i.e; activechart.seriescollection(1)......

View 2 Replies


ADVERTISEMENT

Series Collection Vba

Jan 6, 2010

I trying to code a SeriesCollection in vba, below is the code I have:

' ActiveChart.Name = "Chart1"
ActiveChart.PlotArea.Select

ActiveChart.SeriesCollection(1).Name = "='Chart1'!$C$1"
ActiveChart.SeriesCollection(2).Name = "='Chart1'!$D$1"
ActiveChart.SeriesCollection(3).Name = "='Chart1'!$E$1"
ActiveChart.SeriesCollection(4).Name = "='Chart1'!$F$1"
ActiveChart.SeriesCollection(5).Name = "='Chart1'!$G$1"
ActiveChart.SeriesCollection(6).Name = "='Chart1'!$H$1"
ActiveChart.SeriesCollection(7).Name = "='Chart1'!$I$1"
ActiveChart.SeriesCollection(8).Name = "='Chart1'!$J$1"
ActiveChart.SeriesCollection(9).Name = "='Chart1'!$K$1"
ActiveChart.SeriesCollection(10).Name = "='Chart1'!$L$1"
ActiveChart.SeriesCollection(11).Name = "='Chart1'!$M$1"
ActiveChart.SeriesCollection(12).Name = "='Chart1'!$N$1"

However it it giving the error "Object denfined or Appication denfined"

View 9 Replies View Related

Name Each Name Series Collection Of Chart

Feb 7, 2008

I hope this passes muster. Anyways, I wrote some VBA code to handle an embedded chart in my workbook. I named the chart "Data" but i'm getting some unexpected trouble from VBA. Last time I worked on this set of code, it ran fine. When I try to run it now, it is throwing up an error: "1004 Unable to set name property of series class" The .name function is not working correctly but everything up till that point is working correctly. I have 5 sets of data in this chart also ....

View 9 Replies View Related

Add Series Collection From Dynamic Sheets

Jul 29, 2014

I've created one file: Mappe1_results.xlsm

This file ask in another file "Mappe1_ground.xlsx" for "B" and "N". Now one new sheet is created with the name "month-2014" and shows me which Category (B) is how often referred in one month. After that one chart is created for a better representation. This can be done for every month (which month is selected by the user over the button "Auswertung" in Sheet "Tabelle1").

Now I have a few problems / requirements:

1. If one user is using (maybe) Jan as his selected month, in the sheet "Auswertung" should be one duplicated chart of the Jan Chart., with no other (previous) series. Because Jan has no previous conditions (prev. year).
1.1 If one user is using another month (maybe Feb), in the sheet "Auswertung" should be one chart with both series of Jan and Feb and so one (for the other months). So that in "Auswertung" the chart is one comparison over the months. Only Feb/Mar/Apr/May/Jun/Jul/Aug/Sept/Oct/Nov/Dec have one prev. month.

For example: If one user write "Apr" into the inputbox and "Mar" is in the sheet existing, so in the chart of "Auswertung" should be April and March shown.

Some functions are set in my macros, but the problem is that the results are not equal between the sheet "Auswertung" and maybe "Jan-2014" or "Feb-2014". Because in "Auswertung" we need called all Categories (they can be found in "Referenz" - A).

All what I want is in "Auswertung" one chart with all present categories of "Referenz" - A and the series of the created sheets by the user.

2. The next problem is, every created sheet has one legend "Anzahl im ..." - this legend of every series should be shown in "Auswertung", too. So that we know which color is for which month, u know.

View 2 Replies View Related

Entering X And Y Values To Series Collection?

May 19, 2013

I have a VBA module in Access that extracts data and copies to an Excel spreadsheet. Every time I run the code additional data is extracted and displayed on a chart together with previous data. When I enter values to the series collection the first axis be it X or Y is entered correctly but the second axis produces error 1004 'unable to set XValues property of the series class' If I swap the lines of code around the error switches to 'Values' (y axis)

wchart.SeriesCollection(NoCurves).Values = wsheet.Cells(9, 3 + (3 * (NoCurves - 1)))
wchart.SeriesCollection(NoCurves).XValues = wsheet.Cells(8, 3 + (3 * (NoCurves - 1)))wsheet.Cells(a, b))
wchart.SeriesCollection(NoCurves).Name = wsheet.Range(Cells(6, 2 + (3 * (NoCurves - 1))), Cells(7, 2 + (3 * (NoCurves - 1))))

View 2 Replies View Related

Series Collection Names Instead Of Numbers?

Aug 30, 2013

I have a graph with something like 40 series that are being plotted. For one, I create non-standard data labels using VBA. In that code, I refer to ChartObjects(1).Chart.SeriesCollection(34). At some point I deleted a series that preceded it in the "select data" list and the code crashed. Took a lot of digging to learn that SeriesCollection(34) had become SeriesCollection(33).

To avoid this in the future, is there a way to refer to the SeriesCollection by a unique name rather than a sequential number?

View 4 Replies View Related

Reference Series Collection In Chart

Nov 30, 2007

I'm looking for a way to name lines in a pivot chart instead of default numbering eg ActiveChart.SeriesCollection(1). This in order to attach variable lines to y-axis no 2 no matter which selection is made in the pivot.

View 3 Replies View Related

Conditional Series Collection Colour For Chart

Sep 24, 2009

I am using a bar graph and would like conditional formatting for a series collection. So if the series collection is greater than 30%, the single entry (not the whole series) would turn red. I have attached an image of what I currently have. There is a data validation list at the top which tells the graph what series to use, so the data is always changing.

I hope this all makes sense. Basically, if an entry is above 30%, I want the single entry in the series to turn red.

View 2 Replies View Related

Coloring Pie Chart Using Series Collection Only Returns One Color?

Jul 22, 2014

I am trying to change the color of piechart using the code below:

Code:
Sub ColorPieChart()
Dim i As Integer
Dim myCol(10) As Long

[Code].....

Basically, I want each series in my graph to have the colors formulated by myCol. The code above, however, only colors the graph with color given my myCol(1), so it seems as if something is wrong with my loop.

View 8 Replies View Related

Assign Named Range To Chart Series Collection

Feb 9, 2008

I am trying to assign a named range to a series on a preexisting chart in a sheet, but I get the error that "unable to set values property of series class". This is the code example that DOESN'T work:

Sub assign_values()
Dim myrange As range
Set myrange = range("a1")
Set myrange = union(range("a5"),myrange)
activechart.seriescollection(1).values = myrange
End Sub

However, this code DOES work:

Sub assign_values()
activechart.seriescollection(1).values = range("a1")
End Sub

I don't see why the first wouldn't work, but the second would work. I suspect it is something to do with the union function. i am trying to go through a set of data and then group certain cells into a named range to be used on the graph.

View 3 Replies View Related

Excel 2010 :: Dynamic Changing Of Series Collection Values?

Jul 6, 2014

I still get the 'Object doesn't support this property or method. Error code 438' error. I am using Excel 2010

VB:
j = 3
Do Until j = 6
ActiveWorkbook.Sheets(k).Activate
Set chartX = ActiveSheet.ChartObjects("X")

[Code]....

The macro is supposed to dynamicaly adjust series range for 3 charts for x,y,z, values in each of sheets. Charts are a line type.

View 3 Replies View Related

How To Access Excel Charts Series Collection Linked To Empty

Apr 23, 2003

I'm trying to use VBA to automatically change the data displayed in an excel chart. To do this I count the number of items displayed on the chart using Chart.Seriescollection.Count. I then loop over the Chart.Seriescollection(x) and try to change the Chart.Seriescollection(x).Formula string to link to the cells I want.

Problem is that, sometimes, the cells the curve is currently linked to are empty. Such a curve does show up in the Count, but I can't access the .Formula, even though this can be done manually from within Excel.

View 9 Replies View Related

Change Order For Chart Series Collection Macro Code

Mar 18, 2008

I have a bar graph with 2 series of data. Anyone knows how I can specify the order in which they appear? code looks similar to the following. The bar graph shows the second series before the first series. How do I reverse the order?

With cht
.ChartType = xlColumnClustered

' first data series
Set ser = .SeriesCollection.NewSeries
With ser
.Values = someValues
.XValues = someValues
End With

' second data series
Set ser = .SeriesCollection.NewSeries
With ser
.Values = someValues
.XValues = someValues
End With

View 2 Replies View Related

Possible To Change The Index Numbers Within A Collection

Feb 1, 2010

I have created a userform that upon clicking a commandbutton adds a line of 4 textboxes. Everytime the user clicks the commandbutton a new line of textboxes is created. The 4 textboxes in each line are described by a class (hope I am using the terminology correctly). And each instance is saved in a collection. The problem is that I am giving the user the ability to insert a new row in between two existing rows.

When this happens, I need all of the index numbers to re-order so that they are consecutive from the top of the form to the bottom. Example: The user enters 6 rows of data and then realizes that they missed an item that needs to be inserted between rows 3 and 4. Currently the rows are indexed 1 to 6 with 1 being the row at the very top of the form and 6 being the row at the very bottom of the form. If I insert a row in between 3 and 4 I will end up with the index numbers going from top of the form to bottom (1,2,3,7,4,5,6). Is it possible to reorder the index numbers so that the inserted rows index number will be 4 and each row after that will go up by one?

View 9 Replies View Related

Change Index Whithin A Collection

Apr 2, 2008

I have several collections of objects in a macro I have created. However I would now like to be able to shift the order of these objects around (ie increase or decrease its index by 1 each time, and shift the other objects around it). For example I have collection1 which contains three objects x,y, and z with indexes 1, 2, and 3 respectively. I now want to give y the index of 1, and so shift x up to 2 so the resultant order is y, x, z. Is there anyway I can do this whithout copying all objects to another collection and recopying back in the desired order?

View 4 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

Negative Number In Cells Collection

Aug 2, 2007

I came across this expression going through an Excel VBA code. Can someone plz explain what the argument (-1,1) points to ?

View 9 Replies View Related

Determine Selected Series On Chart?

Mar 26, 2014

Is there a way of determining the series that has been selected on a chart?

View 3 Replies View Related

Plot Each Selected Row Range As Series In Scatter Chart

May 16, 2008

I need to plot multiple series in a scatterplot. The problem is that the number of series is user-defined. And also, the number of data poitns in each series is different. I've looked it up already, but a lot of the examples i've seen don't account for the fact that I need to run through a loop and add series into my graph.
In other words, i need a way to select a certain range each time it runs through the loop, and add the data as a series into the chart. Also, the user enters how many series there are, so I use that as a counter

View 9 Replies View Related

Scatter Plot Chart With Multiple Series From Selected Range

Jan 31, 2009

What I want to achieve is a script that would create a new scatter plot of multiple series from a selected block of cell. I found a thread that was similar but what is different from my data is that my x values are different for each series.

The format of the data is in the following format, the first series will the first x,y pair, the 2nd series would be the second x,y pair. I don't know if it'll be an issue but one thing is that the date might be different lengths. For instance, the 3rd series, only has 4 data points, whereas the other series contains 6 data points?

x0.200.400.600.801.001.20
y5.002.501.671.251.000.83
x0.100.200.300.500.701.30
y5.002.501.671.000.710.38
x0.100.300.400.50
y6.672.221.671.33

So essentially, is there a way I can have the script say, select your range, and then graph the selected range as a scatter plot?

View 9 Replies View Related

INDEX And MATCH Per Current ROW Selected

Mar 28, 2014

Is there any way to use an INDEX and MATCH formula based on the row that is currently selected? If not, is there any other function that can be used to accomplish the same?

I need the formula to use whatever is in column A of the current row selected as the criteria used to match the information to be returned.

View 3 Replies View Related

Keeping The Chart Name As The Activechart

Nov 19, 2009

I'm looking for when 'Chart 1' appears in the code, I would like it to link to the current chart I've just created.

View 4 Replies View Related

How To Replace (ActiveChart) With Name Of Chart

Jun 3, 2014

I got the following code:

Code:
ActiveChart.SeriesCollection(11).Format.Line.Visible = True

This works if I click into the chart before running the macro.

However I want that it always runs, also when I'm not inside the chart. How can I replace ActiveChart with Chart&Name of Chart?

Code:
Charts("Chartname").SeriesCollection(11).Format.Line.Visible = True
didn't work.

View 6 Replies View Related

ActiveChart.Location Error

Feb 1, 2008

I am writing a macro to place a graph into every worksheet.

View 9 Replies View Related

Activechart.export Not Renaming Temp File

Apr 20, 2007

I am trying to export a chart using the code below, the loops change the data that is used to produce the chart:

Dim strFilename As String
Dim strExt As String
Dim lngProfile As Long
Dim lngOption As Long
For lngOption = 1 To 3
Range("nmOption") = Choose(lngOption, "Existing", "Option 4", "Option 5")
For lngProfile = 1 To 4
Range("nmProfile") = "Profile " & lngProfile
ActiveSheet.ChartObjects("Chart 13").Activate
ActiveChart.ChartArea.Select
strExt = "gif"
strFilename = ThisWorkbook.Path & "Images" & _
Range("nmOption") & "_" & Range("nmProfile") & "." & strExt
ActiveChart.Export strFilename, strExt
Next lngProfile
Next lngOption

Each export command creates a file with the correct name but no data (0kb in size) and a temporary file that is the correct file type (I have tried both jpg and gif).

I could try and copy the temporary file, but why does Excel not finish the job? I have tried to put a loop in and also added DoEvents after the export but no joy.

View 4 Replies View Related

Excel 2010 :: INDEX MATCH Only Returns First Value Instead Of All Matching Values In Selected Column

Jul 18, 2014

Excel 2010: I'm working with a sheet where I would like to get accurate results on the make and model of cars sold in a given week. The workbook contains several worksheets each representing weekly sales numbers for different vehicles.

The Make-Models tab has the lists used to create the drop-down selections.

The Sales tab allows one to create an ad hoc report on the total number of vehicles sold, by Make and Model. Cell B2 is named 'SelectedModel' and used in the formula found in column E, Total Sold.

Problem: When I select Honda, for example in B2 of the Sales worksheet then select Accord in cell B3 of the same. The results returned in E2, E3 and E4 are 2, 3 and 4, respectively, instead of 8, 3 and 7.

2 Honda Accords were sold on Monday and 6 on Tuesday of the same week. My formula is only returning the first matched value of 2 whereas I would like it to return 2+6, 8 for week 1. Same goes for other weeks.

Select any other make and model and notice the problem follows. I believe the error is due to incorrect usage of the formula or incorrect formula altogether.

IF(ISNA(INDEX(Week1!E:E,MATCH(SelectedModel,Week1!B:B,0))),0,
INDEX(Week1!E:E,MATCH(SelectedModel,Week1!B:B,0)))

View 9 Replies View Related

How To Extract Series Of Number From Within Data

Mar 1, 2012

I have a spread sheet with some data strings in Column E.

In Column A I want to extract a series of number from within the data in column E.

Example data in Column E

C:cleanedsystems1021_update_log_2-12-2012.csv
C:cleanedsystems42_update_mail_log_2-12-2012.csv

I created a formula in column A "=MID(E2,20,4)". I drag this down the column and I get the following results

1021
42_u

The first result is fine but the problem is the second result. Because I am looking at fixed length I am often getting something other than the file number which I seek.

Is there a way to do a formula that will go to my starting positions (this is a constant starting point) and then look for the numbers before the first "_" as a stopping point? The maximum will always be 4 digit numbers but the problem is there are 1-3 digit numbers as well.

View 4 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

Name/Number Of Next Workbook In Numeric Series

Mar 18, 2008

I have a userform which saves its info to a spreadsheet. what i want to do is to also open a new workbook, save the same info to the new workbook, copy and paste from existing spreadsheet will do instead of linking the userform to a different workbook (i can do all this) I then want to save the workbook in a specific folder(folderA) but named by the next number ie workbooks 1, 2, 3, 4, 5, 6, 7, 8 etc exist so the next workbook should be called 9 so I need some code to look for the names of existing workbooks in the folder and determine the next. Then I want a spreadsheet to at a pre-set interval(15 minutes) open each workbook , copy the line to the next blank row and move the workbook to a second folder(folderB). The folders A & B will only contain these workbooks.

View 2 Replies View Related

SUMIFS Using Part Of Number Series As Criteria

Apr 12, 2012

I would like to use an (I think) easy SUMIFS formula. In this case I'm using only 3 criteria, and 2 of them work perfectly. With the third I want to SUM only IF the series begins with 112 in the example.

Criteria 1 Criteria 2 Criteria 3 SUM
SYS 1 111234 105
SYS 1 111345 111
ORA 2 112456 33
SYS 2 112998 70
SYS 2 112856 56

[Code] ..........

From what I've found out so far I could use "112*" ore something like it, but I cant get it to work.

View 2 Replies View Related







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