Change Chart Data Series (rows) Using Named Ranges?

Mar 13, 2013

I have a chart in a workbook that works fine by looking at the following data series:

=Workings!$A$2:$C$35

In the data series above...where the numbers are 2 and 35 I have named ranges "CHART_Start_Row" and "CHART_End_Row" which will change dynamically as appropriate and can replace these static numbers - but how do I incorporate these named ranges into the data series reference?

View 2 Replies


ADVERTISEMENT

Create Chart Using Dynamic Named Ranges For Series

Jul 27, 2012

I've created my dynamic named ranges using the OFFSET function, ex.

="OFFSET(SAMPLE!$D$4,1,0,COUNTA(SAMPLE!$D:$D)-1,1)"

I'm now trying to get my chart to use that range. I read at [URL] .... that I need to make sure my series reference is a fully qualified reference. So I've entered that series reference using the name of the workbook followed by the range name (=2012-PIRS.xlsx!SAM_CLAR2DEL). I have two copies of my workbook (one as xlsm with VBA project, and one with xlsx without VBA) and I can't get Excel to accept the series value in either workbook.

ERROR MSG:
The formula you typed contains an error. Try one of the following:
- Make sure you've included all parentheses and required arguments.
- To use a function, click Insert Function on the Formulas tab (in the Function Library group).
- If you include a reference to another sheet or workbook, verify that the reference is correct.
- If you are not trying to enter a formula, avoid.........

View 1 Replies View Related

Dynamic Named Range In Chart Data Series

Nov 30, 2006

I am attempting to use a dynamic named range in a chart data series as described in Excel Hacks (Hack #42 and Hack #52).

Using Insert|Name|Define I have created a named range called CashFlowSaleChartDataRange that is set to the following value:

=OFFSET('Cash Flow-Sale'!$O$10,0,0,NumFlows,1)

When I subsequently assign a reference to this named range in the data series dialog it will accept the answer and my chart will adjust to reflect the updated range. However, if I return to the data series dialog, I now see the range address returned by the OFFSET function rather than the named range reference.

View 2 Replies View Related

Change PT Data Source Using Named Ranges?

Feb 9, 2012

I have a worksheet with many pivot tables and (eventually) 2 data sheets. I run a macro that creates the first pivot table and copies it 17 times. Then, using Call, I would like it to create the second data table, "Credits" (I'm working on that, but that's a seperate issue). Finally, I want one of the existing PT to change to the new data, "Credits".

I'm using an named range and that seems to be where I'm breaking.

Code:
Sub Remove_Credits()
'
Dim CSD As Worksheet

[Code].....

View 4 Replies View Related

Chart Wizard Limited To 6 Rows Of Data For Series

Nov 24, 2009

I am trying to create a line graph and I have 17 rows of data for 17 different employees. There are 18 rows when including the header row.

My data is as follows

Column A - Employee Name
Column B - Month 1 data
Column C - Month 2 data
Column D - Month 3 data
Column E - Month 4 data
Column F - Month 5 data

When I highlight the data and go to the chart wizard, I select "Series in Rows".

However, on the series tab it only brings in the data for 6 employees.

Is there a way to automatically bring in all the data without having to do it manually, or is this a limitation of Excel?

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

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

Named Ranges In A Chart - .

May 30, 2007

I have a spreadsheet with 300+ questions in columns (covering 2 worksheets - rows 1 to 5), and the answers to the questions are placed in the rows beneath - column A & B lists who the answers came from.

The idea here is that on a seperate sheet a user can enter a question number (e.g: 1.2OP007) and a graph will update to show the different values given for each person who answered that question.

So, in this seperate sheet I have the question in cell $A$1.
In cell $B$1 I have this formula:.........................

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

Excel 2003 :: Dynamic Named Range Of Non-contiguous Cells Suitable For Chart Series Reference

Nov 11, 2012

I am running Excel 2003 on a Win7 system.

Here is my situation:

Each of my data sets spans roughly 75 columns by 250 rows at present, but this could expand. The first 7 rows contain metadata. Columns 2-25 or so contain the raw data, from which everything to the right is calculated. The data sets have most columns in common, but not necessarily all.

In order to tease out the most meaningful information from my data, I frequently sort all or part of it based on varying criteria. When I find a useful sorting criterion, I create a new column with a header that describes the criterion and populate it with a formula that returns a 1 if the condition of interest is met for that row, or a 0 if it is not. For example, if I am doing this in column AA, I might enter

=--(AND($AX8>$AA$4,$Y8>0))

and copy it down to the end of the data. The resulting vector of 1s and 0s quickly re-identify data that meets that criterion even after subsequent resorting. It also makes locating data that meets multiple sorting criteria extremely simple. Essentially, I create a truth table.

Cell $AA$4 in the above example contains a "comparator" value I might wish to change at some point, which would change the subset of data the condition selects for.

Here's the first hard part:

For each data set, I need the ability to generate meaningful plots that includes separate series based on the criteria I have described. However, I also need to retain the ability to resort the data or change the comparator value without disrupting these plots. In other words, the plots must NOT change when the order of the data is changed, but MUST change to display the appropriate data when the comparator changes.

Here's the 2nd hard part:

Once I have this working for one data set, I need to be able to port it to other data sets (which are contained in other workbooks), so that I can compare equivalent plots from each. I also need to minimize the number of manual steps involved in doing so, to avoid human errors and excessive time consumption.

The only other possible complication I can think of at the moment is that, to this point, I have been inserting blank rows to isolate subsets that I do not wish to perform further sorting on from each other.

Right now I am angling toward VBA code that loops through the entire data set to generate base dynamic ranges using the column header row (row 1) as the names, and the entire column of data for the rangeloops through the truth table columns to generate "branch" row ranges for each of the sorting conditions,loops through the entire data set one more time to create "branch" ranges for each of the base ranges.

I could generate some code to accomplish a one-off solution for a given configuration of a single data set (provided there is not a list length limit in a chart series that I'd be violating)...but without a dynamic named range, I don't know how to get to something that would update appropriately. So in essence, I am still stuck at the dynamic range part of this.

View 1 Replies View Related

Change Colour Of Chart Series

Jan 4, 2010

I'm attempting to write a code that will change the colour of a series in a chart based on the name of each series. i.e. I have Roads, Water and Rail as three of my series names. can i somehow assign the colours yellow, blue and red to these series using macro code.

View 5 Replies View Related

Vba To Change Named Ranges

May 12, 2007

I was given the
What I am looking to do is have a range of cells that I have named to be used in a data validation for a drop down box. I have named the cells and would like to have the user name the cells by typing in the name into one cell.

For example

Cells F10:F14 are named "orange" right now (typed in cell F9)
I would like the user to be able to change the name of the cells to whatever they want by changing the cell in F9 - i.e. "banana" and the range is automatically named banana so the data validation can search for Banana instead.

The

Dim oldName

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim Rng As Range
Set Rng = Range("F9")
If Not Intersect(Target, Rng) Is Nothing Then
Range(oldName).Name = Range("F9")
ActiveWorkbook.Names(oldName).Delete

This Code works great for 1 range - but I have 30 - I can't seem to figure out how to copy it etc for the other 30 ranges.

View 9 Replies View Related

Named Ranges Reference Change?

Nov 27, 2012

Change "refer to" in Named Range. I have a named range myrange referring to A1:A5. I have a condition for B1, if B1= annual then myrange should refer to C1:C5 and not A1:A5..

View 2 Replies View Related

Stacked Area Chart Series Colour Change

Jan 6, 2010

I have a stacked area chart located on its own individual worksheet. I would like to use VBA to apply colours to individual series based on the name of that series. I have applied the following code which I found on the following help forum, changing it slightly to fit my needs: http://www.ozgrid.com/forum/showthread.php?t=91381

View 3 Replies View Related

Change Color Of Chart Series Based On Source Value

Apr 23, 2008

it is possible to have the series of a stacked graph to change color based on the source value.

e.g.
i have a stacked cone graph made up of 5 piece (series)
i need each piece colored either green, yellow or red depending on whether its value is large than another

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

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

Macro: Plot Graph/Chart By Series Of Rows

Jun 30, 2008

I've been trying to work out a code for a while now to plot some series in rows on a graph. The wonderful Mr Pope helped me with one before but for series in columns but i just don't seem to understand it enough to use it for this problem. the graph already has 2 series plotted (called the envelope) so i have to use seperate series to plot the data.

Basically the name of series is down column A
but the range is from E1 to Y1
and the data to be plotted on the graph which already has two series plotted in it is E2 to Y2, E3 to Y3 etc. iv been trying to use this code but failing miserably

Sub adddatatopsd(Name As Range, XData As Range, YData As Range)
With ActiveSheet.ChartObjects(1).Chart
With .SeriesCollection.NewSeries
.ChartType = xlColumnClustered
.XValues = XData
.Values = YData
.Name = Name
.ChartType = xlXYScatterSmooth
End With
End With
End Sub...........................

View 4 Replies View Related

Delete Rows Without Named Ranges Failing

Apr 3, 2008

I have a dynamic named range in my worksheet:

Range Name = AssignDt
RefersTo: =OFFSET('Raw Data'!$W$2,0,0, COUNTA('Raw Data'!$A:$A)-1,1)

I perform a routine in VBA which deletes unwanted rows of data from my worksheet. The problem occurs if row 2 happens to be one of those rows. It not only deletes Row 2, but it also deletes my Named Range.

View 7 Replies View Related

Change A Series Of Rows.

Feb 12, 2009

I want to change the values arranged in the row wise to the format I have attached in the excel sheet. Manually it would be very tiresome.

View 4 Replies View Related

Macro: Create Named Ranges. Unknown Columns/Rows

Sep 9, 2006

I need to make named ranges from an unknown number of columns(at least 1) each with an unknown number of rows. Each column has the name of the named range as the first row, and then a variable number of rows containing part numbers.

I can do it 1 by 1, but id rather do it in a loop so that blanks dont cause errors. there will be different people using versions of this sheet with different model/part number information What i've tried: Count number of colums with row 1 containing data (11 max, which is more than will ever be used) add into array(I know i dont really need to add into the array, but i might use it later for some other code). The problem i'm having is finding the range of rows that need added to the named dynamic range and adding it.

modelcount = Range("G7") 'G7 (for now) contains =COUNTA(H1,I1,J1,etc)

For i = 1 To modelcount
Redim Preserve Models(0 To i)
Models(i) = Cells(1, i + 7)
Range1 = Cells(2, i + 7).Address(xlA1)
lastRow = Cells(rows.Count, i + 7).End(xlUp).Row
Range2 = Cells(lastRow, i + 7).Address(xlA1)
Reference = Cells(2, i + 7).Address(xlA1)
ThisWorkbook.Names.Add Name:=Models(i), _
RefersTo:="=OFFSET(Reference,0,0,counta(Range1:Range2),1)", Visible:=True
Next i

This gets me the range i need, but doesnt create the named range properly. If i go to insert>names>define, the named ranges are created, but they dont relate to the data in any columns. It shows the variable names rather than the cell range the variable represents.

View 2 Replies View Related

Creating Multiple Named Ranges X Rows High X Columns Wide

Mar 13, 2012

I need to create hundreds of named ranges going down a single sheet.

The name of the first range is in cell a1 and is 13 columns wide and 7 columns high (a1:m7)

The next name is in a8 and the range is a8:m14 and so fourth

If it's easier on a separate sheet I can have a list of names I want in column A and then the cells they refer to in column B.

E.g.

A B

Range1 Sheet1!A1:M7
Range2 Sheet1!A8:M14
Range3 Sheet1!A15:M21

View 2 Replies View Related

Define Only 2 Named Ranges From List Of Named Ranges

Apr 28, 2014

I have written this macro to convert into a csv file to run for all defined named ranges in the activesheet. It run jst perfect when I hit SAVE button and it creates that many different CSV files for each named range.

However I am trying to use same macro in the another file and the problem I am facing is there a lot more named ranges and I want to run the macro for only selected NAMED RANGE. In this case 2 Named Range / 24 Named range.

What part of code do I need to change and to what to make it work for just 2 named ranges ?

View 6 Replies View Related

Chart: Data Series Address

Nov 9, 2006

Trouble: I need to replace address of datacells for serias of chart
Result: data for serias will be some lines above or below as i need

simv = Workbooks(1). Names("adr").RefersToRange.Formula
num = Len(simv)
For i = 1 To ActiveChart.SeriesCollection.Count
oldadr = ActiveChart.SeriesCollection.Item(i).Formula
res = Left(oldadr, Len(oldadr) - num - 3) + simv + Right(oldadr, 3)
ActiveChart.SeriesCollection.Item(i).Formula = res
Next i

simv - my new address data for all serias this code is working on Excel 2003, but not working on some other versions. Beause "Formula" may has different structure :
version 2003: =SERIES(,,'C:...[macros.xls]Sheet2'!$B$8:$M$8,1) other version:
=SERIES('C:...[test.xls]#Source'!$C$6:$D$6,'C:...[test.xls]#Source'!$E$2:$AC$2,,1)

View 3 Replies View Related

Dynamic Chart Series Data

Oct 25, 2007

I have a chart with Data Series being dynamic ranges. There is only one series and x & y each have a dynamic range. I need to be able to include Series Name as a dynamic range.

For example. I have 3 rows of values with 3 columns.

Col 1 Col 2 Col 3
Name X-Val Y-Val
A 1 3
B 4 6
C 8 0

I now need a chart that has 1 series with a x range of col2 and a y range of column 3 but a corresponding name equal to Col 1. So when I move my mouse over each point I get the series name. E.G. I hover over poing 1,3 I show the name as A. Or I hover over point 8,0 I get C.

If it isnt possible using the ranges the way I am, then I would be looking for a possible solution. I am sure I could do this by some sort of loop but not quite sure given the number of rows constantly changes.

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

Line Chart With Variable Data Series

Jan 17, 2014

I am trying to produce a line chart, which will use imported data on a separate sheet (but within the same workbook)

The imported data can be of different sizes ie column widths and length. Some columns may contain only zero and should not be included in the chart, and will be to right of the data.

I have created a named range for the data series called ChartData using =OFFSET(Data!$C$1,0,0,info!$C$7,info!$A$2) - C7 and A2 are calculations to set column and row sizes. I have tried to use this as the chart's data series, but without success.

View 4 Replies View Related

Referencing Partial Chart Series Data

Sep 16, 2006

is it possible to reference part of a data series from a chart to a combo box?

View 3 Replies View Related

Defining Variable Data Row For Chart Series

Oct 5, 2006

I want the below code to run from R1C10 (i.e. cell J1) to the end of the data in the row, which will vary in position, rather than having to define where the end of the row will be beforehand (i.e. R1C21).

Is this possible?

View 9 Replies View Related







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