#Ref Error In Chart Legend
Dec 18, 2008I'm running Excel 2003 and I'm getting a #REF error in the legend of a chart! It displays the #REF and then the label. Anyone any idea what causes this - I can't find anything in Help.
View 2 RepliesI'm running Excel 2003 and I'm getting a #REF error in the legend of a chart! It displays the #REF and then the label. Anyone any idea what causes this - I can't find anything in Help.
View 2 Replieshow can I add an legend entry that has been removed by error?
View 3 Replies View RelatedI am creating a chart where the number of data series used on the chart will change every time the code runs depending on what information people are looking for. That part works fine. I need a legend that shows which data series were added to the chart. Is there a way to get a dynamic legend on the chart that matches the data series, without manually adding it?
View 6 Replies View RelatedI want to include a legend to a bubble chart in the folowing format: the smallest bubble in this legend should represent values between A and B, the second (somewhat bigger bubble) should represent values between B and C,and so on. Is it possible to produce a standard legend in a bubble chart?
View 2 Replies View RelatedI have a chart graphing different series, which includes a legend to label each series. The labels are linked to particular cells in the worksheet.
Most of the chart has Arial font formatting, but I need to change the formatting of a few characters in the legend:
I know that i can change the formatting of the whole legend, and even different entries in the legend. Is it possible to change the font of just a couple of characters in one legend entry?
Elements I need to change are:
Font type (eg from arial to symbol)
Size (varying from 8 to 14)
Bolding etc.
So i deleted a chart legend - is there a way to get this back or do you have to start all over again?
View 4 Replies View RelatedHow do i change a title in legend on a chart. i.e. I want the label to be MGRS 2%
Job Category
Category %
EE Total
Mgrs
2%
15
Supvr
6%
51
[code]....
I have 10 graphs with more than 20 legend entries. However, each graph only needs 3-4 elements out of the 20 legend entries in the graph. Is there any way to force Excel to only show those legend entries that have a value? (without deleting them manually)
View 12 Replies View RelatedI have a chart with 20 series labels that are series 1, series 2.... etc. I want to label them with 20 corresponding cells but can't find how to do this in Excel 2010 (I seem to remember this being easy to do in older versions). At the moment I am having to click on source data and edit each label individually... Is there a quicker way?
View 2 Replies View RelatedI have charts that needs to be placed on specific position and have specific sizes on a chartsheet. I use chartobjects(i).plotarea (top, left, width, height) for that.
Unfortunately when I set these values they still change and get antoher value, there is some scaling going on in Excel and I do not know where that comes from. I have been looking on the internet and finally I found a piece of code which works, but still not good enough, because the legend is also not good positioned.
De data for resizing the charts (ChtNew), the legends and the charttitle I get from other charts (ChtOrig). The legend.legendposition of ChtOrig does not have a value but it still have a top,left,height en width which I use.
I show you my code, the part with the for-next is taken from the internet.
With ChtNew.legend
.Top = ChtOrig.Legend.Top
.Height = ChtOrig.Legend.Height
.Left = ChtOrig.Legend.Left
.Width = ChtOrig.Legend.Width '* 1.1
.Top = ChtOrig.Legend.Top + ChtOrig.ChartTitle.Top
End With
see this example of a chart: see Image1.gif (the right thumbnail) as you can see 2 different types of graphs are combined: "lines with markers" and "clustered column".
in the legend one can see that the order inside the legend is clustered by the two types. within a type i can change the order easily (right click on a line or column - format data series - series order - up or down).
question: i would like to change the order freely. how to do this? for the order inside the legend i actually do not care at all, whether a representation of the data is a line or a column. i only want to make it as readable as possible. example what i'd like to get (made by handmodifing the picture with a drawing program): see Image3.gif (the left thumbnail)
I have a sheet with about 50-60 charts and I am hoping to have a master list of chart titles on the side, how can I link these titles with the charts themselves?
View 1 Replies View RelatedI have a chart that combines 2 xy plots and a set of stacked columns ( total of 4 series).
I can adjust the series ordering between the 2 xy plots, and between the stacked columns, but not for all 4 at the same time.
I'd like the legend to show up as:
Series1, Series2, Series3, Series4
where 1 and 2 are the xy plots and 3 & 4 are the components of the stacked columns.
It is currently:
Series3, Series4, Series1, Series2
Any idea how to re-order the legend entries?
Has anyone ever seen a problem like this? The Legend text is not displaying what is in the cell reference and I cannot figure out why.
View 9 Replies View RelatedThe order of entries in my chart legend make no sense to me. Why is it not matching the order of the source data?
View 1 Replies View RelatedI have created a dynamic chart for multiple series. I have created this using the offset function and have named 20 ranges. The problem I have is that if only 19 of the 20 named ranges are populated it reads that the worksheet contains one or more invalid references.
Is there a way to stop this from happening?
I'm working on an evaluating spreadsheet where I give for several items a rate of 1 to 3 and at the end it calculates an average rate. The average rate would range from 1 to 3 as well and their meaning is:
1 - poor
2 - average
3 - good
How can I work on the formula so when the result is equal 1, 2 or 3 it automatically gives in the cell right beside the related legend?
For Instance i might have a cell with the value 30KDPA
the one right below this needs to be 30KDPB
then 30KDPC
basically the last letter is going through the alphabetical order. Once it hits Z it should go to AA, AB, AC . Just like an excel file.
If i select the first cell and just drag it down it copies that exact same cell value.
I'm trying to do a simple loop which creates charts based on an ID number. I recorded a macro and has tried to modify it but am having trouble defining the correct reange when settign the data source. Here is my
View 2 Replies View RelatedI've created a spreadsheet which, on running a macro, imports data from a text file, formats it and then sums various parts of it giving me a subset of the large file as a range of data for a chart (a pie chart) on Sheet 2.
The problem begins when I delete the data in the worksheet in preparation for another import - the Pie chart just loses all the data and I have to manually reselect it in the chart each time.
Once deleted the chart is blank, but as soon as the data is imported, I get reference errors when I click on Sheet 2
I must be doing something wrong. You can delete data and repopulate it and the chart should pick up with the new data. If the cells it is referencing are empty, it is blank. Not so here.
Is it to do with importing the data? Or the formula for my chart data?
I wrote a chart formatting macro, which works when applied to a specific sheet, and I'm trying use it in a for each loop. The macro is supposed to loop through a list of sheets and only format chart 1. I'm getting a "run time error 438: object doesn't support this property or method" at this line:
Code:
.ActiveChart.Shapes("TextBox 1").TextFrame.Characters.Text = "Bodily Injury (BI) Liability Claim Trends" & vbLf & " 2005-" & Range("K5").Value & " Percentage Change"
Here is my for each loop:
Code:
Sub UpdateTextAllStateCharts()
'This macro loops through worksheets in a list and performs the assigned task
Dim sheet_name As Range
For Each sheet_name In Sheets("WS").Range("C:C")
If sheet_name.Value = "" Then
[Code] .....
This line is also causing the same error:
Code:
With .Characters(42, 68).Font
I have a function that exports charts as PNG images, that is suddenly broken. The function is very basic: ActiveChart.Export fileName:=chartFileName, FilterName:="PNG"
Now I can guarantee that chartFileName contains a complete path, with filename and extension, so this is not the problem. I am getting the following error: Run-time error '1004': Method 'Export' of object '_Chart' failed. The only thing I can think of is that I had Office 2007 Beta installed alongside Office 2003, as mentioned by Andy in the following thread: Exporting Charts as GIF - Error. I have uninstalled Office 2007 Beta, and run the repair function of the Pffice 2003 install, but still I have this problem.
I have made charts in VBA charts that needs to be placed on specific position and have specific sizes on a chartsheet. I use plotarea (top, left, width, height) for that. Unfortunately when I set these values they keep chaning, there is some scaling going on in Excel and they won't get the specified size. I have been looking on the internet and finally I found a piece of code which works, but still not good enough, because the legend is also not good positioned
De data for resizing the new charts (ChtNew), the legends and the charttitle I get from other charts (ChtOrig). The legend.legendposition of ChtOrig does not have a value but it still have a top,left,height en width which I use.
I show you my code, the part with the for-next is taken from the internet.
I am trying to find a solution now for 3 days and now I only dream of huge charts (which is not good). So please can someone help me with this? This is the last forum, that I can try, I didn't get reactions from others.
with ChtNew.legend
.Top = ChtOrig.Legend.Top
.Height = ChtOrig.Legend.Height
.Left = ChtOrig.Legend.Left
.Width = ChtOrig.Legend.Width '* 1.1
.Top = ChtOrig.Legend.Top + ChtOrig.ChartTitle.Top
end with
With ChtNew.Plotarea
.Top = ChtOrig.PlotArea.Top
.Height = ChtOrig.PlotArea.Height
.Width = ChtOrig.PlotArea.Width
.Left = ChtOrig.PlotArea.Left
For i = 1 To ChtOrig.PlotArea.Top........
I have a 2003 vs. 2007 problem that I've spent a week or so trying to resolve, to no avail. I have created a fairly complex "dictator application" in Excel 2003. The application performs a bunch of calculations, and stores this inforamtion in a template workbook. The template itself contains one worksheet (to hold the data), and twelve empty "chart-sheets" which I later use to create plots. Of course, everything works fine and life is good in Excel 2003.
Flash forward two years, and half of my company is running 2007. When a 2007 user fires the plot creation routine, he is greated with a lovely error message (# 2147467259): "Method 'Position' of object 'Legend' failed".
Here's the full procedure I'm running to create the plots and position the legends:
Function bChartSumFileData(ByVal lTotalPlots As Long)
Const sSOURCE As String = "bChartSumFileData" 'Procedure Name (error-handling)
Dim bReturn As Boolean
Dim i As Long, j As Long, lNumSeries As Long
Dim sTemp As String, sPlotSetting As String
Dim chtTemp As Chart
Dim wksData As Worksheet, wksInfo As Worksheet
Dim serTemp As Series
Dim uSettings As CHART_SETTINGS
Dim vaPlotInfo As Variant
Obviously, lots of custom functions here; I'm also using a custom "type" to store chart settings (which I read from a *.txt file in a separate function). However, as far as the Legend goes, it shouldn't make a difference with the above code. When I stop execution after the error and look at the template workbook, the chart is created just fine, and the legend is visible, so I'm not sure why the error is occuring. Even better, the number of charts created prior to erroring-out is not fixed: sometimes the error occurs on the first plot, sometimes on the third, etc.
I need a basic code that accomplishes the following:
1) The user can define a legend for which he can format the cells in that legend however he wishes
2) Cells elsewhere in the sheet that have the same value as that in the legend will format exactly how they are in the legend
3) Default if not in the legend
I found this code that is close...but apparently it relies on the user selecting the cells he wants to format according to the legend FIRST...my code needs an Intersect command or something like that.
Also im not sure if this code actually takes into consideration font+border+shading formats...my code would need to take those into consideration.
example of the desired output is attached! ....
I am trying to create a simple xy graph in Excel 2010 using dynamic source data.
I have data in three columns.
There are headings on line 2 and the data starts on line 3.
A B C
1.
2. dp ss ff
3 .1 .2 .3
4 .3 .4 .4
5 .4 .8 .7
6 .1 .6 .8
7 .3 .5 .1
8 .5 .4 .4
I want to create an XY chart with C3 to C8 as the X axis (or dynamic to what ever the last data point is) with A3 to A8 as the Y axis (or dynamic to what ever the last data point is).
I have Defined names for C3 to C8 (myXvalues) and A3 to A8 (myYvalues).
I have created a simple XY graph and selected the ranges as normal.
This is =DATA(,Data!$C$3:$C$9,Data!$A$3:$A$9,1)
The page is named DATA
What I am trying to do now is to edit this range to make the range dynamic.Unfortunately I get error messages which ever way I try to edit the range.
I have tried:-
=SERIES('Data'!$c$3,'Data'!myXvalues,'Data'!$A$3,'Data'!myYvalues,1)
=SERIES('Data','Data'!myXvalues, 'Data'!myYvalues,1)
=SERIES(,Data!myXvalues,Data!$myYvalues,1)
=SERIES(Data!,Data!myXvalues,Data!myYvalues,1)
The data range can go from 8 to 30000 hence the need for a dynamic range!
PS: Also, is there any way to create this graph and dynamic source data in VBA. I have tried this with no success.
I have a series of data and want to create a chart looking like this
Google Image Result for [URL] ...
Where it shows min/max on the error bars, quartile 1/3 on the box and median as a scatter plot. My data is a simple table
Group
Amount F
Amount M
Median F
Median M
Median F+M
[Code] ....
Here F = Female, M=Male and the chart should show all calculation for both gender together (I have another thread up where the gender are separated with the Title (How to create a stock column chart with error bars?? (Both gender separated))
I'm trying to remove lines in my line charts. I searched the internet and find the following code:
Code:
Sub RemoveLines()
Dim ser As Series
For Each ser In ActiveChart.SeriesCollection
ser.Format.Line.Visible = False
Next ser
End Sub
However, when I run the code, I got "Object doesn't support this property or method". I did select the chart. I have excel 2003 with vba 6.5.
I am using bar chart to display top 5 units sold each year to my Excel file. In the data table, I have listed all the units and its number (quantity) sold. The problem is, the legend of the chart displays all the units instead of just displaying units that has values (top 5 units each year) which makes the legend hard to read (see attachment) How do I get Excel to select legends only if there is a value for it?
View 2 Replies View RelatedI have a standard bar graph with 2 sets of data: 1 dataset on the primary axis and 1 on the secondary axis. I have defined the legend entries fairly specifically so the descriptions are long. I have also inlcluded a 'rank' value into the graph which doesn't appear on the graph as the values on either axis aren't at a range that allows it to display. However, I want to display the rank value in a table below the graph. However, when I add the table, the legend entries are so long, the graph gets 'scrunched' and looks terrible.
Is there a way to either:
1.) Only show the rank data in the data table below the graph?
or
2.) Show only the data in the data table below the graph and not the legend entries?
or
3.) Another option to display the rank data on the graph?