Chart Data Labels
I am trying to write an If statement that returns true if Valule is checked off in the Data Labels portion of a chart. I tried using a HasDataLabel properties but Excel didn't recognize that.
View Complete Thread with Replies
Related Forum Messages:
Chart Data Labels Blanks
In a chart if you display data labels is there a way of avoiding a zero being displayed if the relevant cell is the result of a formula?
It seems that even if the result of that formula is a blank or 'n/a' it is still displayed as 0.
Remove Zero Value Data Labels From Pie Chart
I have a pie chart that shows numerical values in dollars and I'm looking for a macro that will delete the $0 data labels. I found this code from Jon Peltier (great website by the way) but I can't seem to get it to work on my pie chart. No errors, just doesn't do anything:
Dim iPts As Integer
Dim nPts As Integer
Dim aVals As Variant
Dim srs As Series
For Each srs In ActiveChart.SeriesCollection
If .HasDataLabels Then
nPts = .Points.Count
aVals = .Values
For iPts = 1 To nPts
If aVals(iPts) = 0 Then
.Points(iPts).HasDataLabel = False
AutoFilter Changes Data Labels In 2007 Chart
I have a scatter chart and have applied data labels using the VBA macro supplied with Excel 2007. They pick up the cells in column A. But I now want to use Autofilter to show different ranges in the chart. Everytime I filter the chart data, the data labels change to show a different label (in fact they seem to be starting from the first label again, even if this value is not shown on the filter). I have tried to edit each data label and enter free text, I've also used a formula to link to the cell and made it absolute, but nothing is working.
The chart must be a scatter chart as it is plotting 2 values. I'm trying to create a Project Portfolio Risk Chart showing Benefits against Difficulty.
Manipulate Chart Data Labels Height, Width....
I m working with bar charts and as I've heard these labels can be a bit of a pain. I've got the labels in roughly the right position 90% of the time however that other 10% has me in rolling fits.
1. A label within the chart area is wrapped on two lines, how could I restrict Excel from wrappign the label
2. A Labels position covers some of the data reported and thus makes the graph messy
how could I find the position of the end of the bar and also the length of the datalabel so I could reposition it. Note I am using 2003 and that I am trying to use
for finding the position although this is only really where im getting to. finding the wrapping position and also being able to manipulate the length of the label is proving tricky.
Negative Chart Values Causes Overlap With Data Labels
I have a Column Graph that will be changing automatically as the data is changed. My problem is that for one set of data the chart looks fine....but if a number becomes negative the bar will overlap with the data labels at the bottom and cause it to be unreadable. I am not able to resize the x axis area or move the labels down any. Is there anyway to make the labels adjust automatically?
Add & Delete Multiple Chart Data Series Labels
My friend has set up an excel workbook with a sheet for every month (labelled Jan graphs, Feb graphs, Mar graphs etc) which has 7 pie charts per sheet. The problem is the pie charts are showing the 0% fields and the data labels are overlapping. I have found a macro that gets rid of the 0% labels but I need to repeat the macro for all the 7 charts on each sheet and all 12 worksheets for each month of the year. I am very new to VBA and coding of any type and have looked but can't find the solution.
The macro I am currently using for "Chart1" on "Jan graphs" is below. The charts are labelled Chart1, Chart2, Chart3 etc.
Worksheets("Jan graphs").ChartObjects("Chart 1").Chart.ApplyDataLabels _
For Each x In Worksheets("Jan graphs").ChartObjects("Chart 1"). _
Show Chart Data Series Labels On All Series. 2007
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?
Chart More Labels
I have a basic bar graph showing the average home prices per quarter. I know I can turn the legend on and position it to show the average price on top of each bar in the graph. I would like to add an additional legend (on this chart) showing how many homes sold per quarter but not display it as a bar. I just want the number displayed maybe on the bar or below the bar. Can I add a separate (extra) legend?
XY Scatter Chart Labels
lable my entries in my scatter chart:
Heres an example:
For my series 1:
Brown ____1.5 ______0.1
Black _____1.2______ 0.5
White____ 1.9 _______0.2
Red ______1.1 _______0.9
Yellow____ 2.0 _______0.4
Green _____1.8 _______0.7
Now the Colors are the lables I need to put in each x and y data.
Not Show #N/A On Chart X-Axis Labels
I have a chart that feeds from dynamic ranges which contain whole rows of null enteries displayed as #N/A. The charts do not plot these enteries (as it shouldn't) however it does display the category label even if it too is #N/A. Is it possible to remove the category label if all data for that row is null. ie the label is also removed from the chart.
Grouped Labels On Chart X-axis
I want to create grouped labels on a chart x-axis of the type created automatically when creating a pivot chart. For example: I have projects, samples and sample yields. There are multiple samples in a project so I have a sheet that looks something like this below:-
I would like to create a chart that has Project and Sample as the x-axis where the samples are all grouped into their project. Pivot charts do this nicely, but how to do it without a pivot chart? As you will see from the attached file I can get both Project and Sample on the x-axis, but the Projects are overlapping.
Offsetting Category Labels Along A Chart Axis
Has anyone ever succeeded in offsetting category labels in a chart by surpressing the first category label. I am plotting monthly financial data over several years and want to show category labels for the month ends which coincide with quarterly month ends (i.e Mar-06, Jun-06, Sep-06, Dec-06). If I select 2 tick marks between categories I get Jan-06, Apr-06, Jul-06, Oct-6) because my first month and category label is Jan-06. Is there a way to offset displaying the first category label by two tick marks and start with Mar-06 and then go every two tick marks between category labels?
Format Chart Labels For Numbers With Commas
I know from searching through the internet you can change the intervals by modifying the minimumScale, maximumScale and MajorUnit fields of TickLabels. What I want to do is change the period of the axis label to a comma. For example,
if it shows
I want it to show
Conditionally Hide Chart Axis Labels
Is it possible to hide some of the number labels on an axis; e.g. in on the chart below to hide the X-axis label 96? Or only start numbering from 97 while the chart displays from 96. Auto Merged Post;Well I have a solution to hiding the first value on the excel X axis values labels just using a custom number format;
but is there anyway of formating more than a couple of the number labels individually?
Data Labels Show As % Instead Actual Value
See xls file. I have this chart and the data labels are percentages instead of the actual value. How did these get that way? Under Chart Options there is a autotext box that is there but if I uncheck it, the data labels go back to the actual dollar value and that autotext box goes away.
I am totally baffeled by this despite serach the help, the internet and this forum. I am sure it is something easy I am missing.
Can some one provide some color on this?
I cut this from a larger book with many tabs because I am not able to send out the entire thing (proprietary).
Data Labels On Xy Graph From Range
Is it possible to plot an xy scatter graph of "Result A" versus "Result B", and have the data points labelled with the values under "Mix" ?
Mix Result AResult B
Data Labels Points In Scatter Plot
I am attaching the Excel File along with this mail. In chart there is data points have been mentioned in scatter plot like (38,15 etc) Instead of these points I want the names that I have mentioned in column A2:A9. I used to make lots of charts related to this and it is very diffilcult for me to manually punch all these names and most importantly the thing is that I cant download the software available on http://www.appspro.com due to some issues can you give me the VBA code for this which will automatically paste these names only I have to change is the data range and its very urgent................ASAP
Format Data Series Point Labels
I am building stacked XY Scatter charts and having difficulty formatting the y-axis values (which are data series point labels)
Rob Bovey's XY Chart Labeler manages this fine, but I work in a strict corporate environment which does not allow downloads. Also the file will be posted on our web as a tool for all company users to extract and analyze data from corporate databases.
I am stuck on the number formatting of the labels. My file is too big to attach; I have included the code below.
I'm sure there is something very basic that I am missing. Needless to say VBA is a challenge for me.
Dim intR As Integer, intP As Long
Dim sngVal As Single, sngY As Single
Dim dtX As Date
Dim chtTst As ChartObject
Set chtTst = ThisWorkbook.Worksheets("GRAPHS").ChartObjects("Chart 18")
ActiveChart.SeriesCollection("Y Axis Values").DataLabels.Delete
Data Point Labels On Filtered Source Range
i'm using this source to add labels to data points in charts:
Dim Counter As Integer, ChartName As String, xVals As String
' Disable screen updating while the subroutine is run.
Application. ScreenUpdating = False
'Store the formula for the first series in "xVals".
xVals = ActiveChart.SeriesCollection(1).Formula
the code is from ms and works. (for some reason they also declare variable 'chartname' although it's never used, anyway). the full thing here: [url]
i actually have my source data filterable. so depending on the filters chosen, the chart updates itself. so it removes data points in the chart as more filters are used.
the problem is that the labels ignore the filters. the code above just goes down the column to grab the labels grabbing values in order, even if they have been filtered out.
a cumbersome workaround would be to copy the filtered data to another range and use that for the labels. this is neither optimal because i have lots of data or elegant.
Odd Chart: Combine Data From Multiple Worksheets And Make A Chart
I am trying to combine data from multiple worksheets and make a chart. I have about 200 keywords in every worksheet (about 50), and some of them repeat themselves through worksheets and some don't. For every keyword, I have an associated value in the next column that I want to portray over time (each worksheet is for a different period).
So what I need to figure out is how to be able to pick any 10 keywords from the worksheets and put them in a line chart where I can see the associated value for each period for every worksheet so I can compare my keywords' efficiency. The tricky part is that some worksheets do not contain the keyword and other worksheets contain the keyword in a different cell than the previous wsheet.
Chart Making- Chart With 3 Data Series
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.
Graph The Following Data In An Area Chart With Line Charts Superimposed On The Area Chart
I am trying to graph the following data in an area chart with line charts superimposed on the area chart. I have a lot of data (and a lot going on) so I'm trying to figure out the best way to show this in excel from a functional standpoing (i can't get this to work in excel!!) to also an asthetic standpoint (dont want it to look terrible or illegible). This is what I'm trying to chart:
1) Weather data (temperature) by region:
So one region, would be: Northwest
I would like the "area" (so a shaded region) to be the min/max of the temperature data for each month.
2) I would like to show the temperature for each year as a line graph on the chart - so you can see if a year falls in or out of the shaded region.
3) I would like to show a company's sales increases across the same months per year as separate line charts. I may choose to just show the biggest outlier year in the end... or to show 2006 (the latest data).
What I am trying to convery with the chart is that the company's sales is or is not tied to weather deviations. I have attached an excel file with the data. I haven't been able to use the area chart or get a two axis chart to work or get it to look even remotely professional.
Add Data Monthly And Then Have To Manually Update The "source Data" To Reflect The Added Data On Chart
I have a column line chart to which I add data monthly and then have to manually update the "source data" to reflect the added data on chart. This is a rolling graph, which mean that I have to remove data for one month(from last year) and then include the new month's data. Is there any way on automating this process...like a macro or something, so once I add the data excel automatically removes one month of old data and make changes to include fresh data. Eg Currently chart is based on data from A2:F2 and I add new data to cell G2. I need something which automatically update the source data to cell B2:G2.
Color Chart Data Points By Cell Values Of Non-Source Data
I have a bar chart that was made from table 1 which has the value in it. I have another table, table 2 that has the name corresponding to the value in table 1. I want to color data points in a bar chart with a different color for each name I have in table 2. I also want to give a data label in the data points with the value I have in table 2 instead of the original data label from table 1. Is it possible to do it?
Using Labels In VBA Code
In the following VBA Code. I have a section labeled tier2 and a section labeled tier3, as you can see.
Both of the calculation formulas are refering to the items listed.
Will the code in the Tier3 section ever refer to the values in the tier 2 section, since they have the same label names?
Using Labels In Formula..
In Excel 2003 you could use Labels in formula by enabling the Tools-->Options-->Calculation-->Accept Labels in Formula setting. In 2007 I can only find an option for using table names in formula. Is the use of standard labels no longer valid in 2007? If it is where do you enable it?
My excel file brings up a userform as soon as it is opened. The user chooses an entry from the ComboBox and then clicks OK. This brings up another userform which has a Label at the top. I want the caption of this label to show the entry from the ComboBox on the first userform. This should be straightforward, but what I've done so far doesn't work!
Label1.Caption = ComboBox1.Value
within UserForm_Initialize(), but it doesn't work!
Selecting Data For Chart
I'm working on a macro that creates columnplots from a sheet of data.
The sheet is organised as a series of tables. Through a userform, the user selects the columns and rows that she wishes to include in the plot.
Is it possible to control the order in which the data is plotted?
For instance, the macro produces the following range to be plotted:
"$D$29, $B$29, $C$29,D33:D31,B33:B31,C33:C31"
where row 29 contains the table headlines, and rows 31:33 contains the data.
However, when I plot this, it always ends up as column B, then C, then D, rather than D first like I wanted.
I'm fairly new to both Excel and Visual Basic, so it's difficult to explain exactly what I'm after, but hopefully someone will understand what I'm after here..
Area Chart With #N/A Data
Currently I'm working with an amount of data that corresponds with one data point every day in one year. Not every day is measured thus nothing is entered, some days can also be 0. Therefore I've made an if statement in the column next to the raw data column with an if statement returning #N/A if a cell contains nothing or 0.
This gives me normally no problems when I want to make a Line chart, excel just skips the #N/A cells and draws the line to the next data point (that's the whole reason for the if statement). However this is impossible with area charts. I can understand why, but I still want it as nothing or 0 in a cell not necessarily mean that nothing happened.
Several Sheets With Data - Chart
I'm currently working on a workbook that has over 50 different sheets. On each sheet there is a column K that I want to graph if desired. From the Main sheet I would like to have checkboxes or something, so that when I press on it, the data from sheet x is added in the graph. Can this be easily done? It's not a problem to hardcode the which-button-calls to-which-sheet (just takes some time), the main thing I cant work out, is how to add a series to a chart, how do delete a series from a chart and so on..
Chart With (dd.mm.yyyy H:mm:ss) Data
I have folowing problem:
I have delivery date (C) and wenn has been delivered (D= Start, E=End)
sometimes Delivery End (E) is on day after Delivery Start but in my chart
you can't see it, what I try to do is to display if Delivery End is not on same day as Delivery Start, so I need to display Delivery Start as negative value (below 0)
but my chart goes from 00:00:00 to like 04:48:00 next day.
in Excel workbook:
Delivery Start - Green
Delivery End - Blue
Chart date is automatically generated (Oracle)
Pie Chart Data Range
I am coming across an error when i am trying to make my final chart. I am trying to chart on ten pieces of data, but for some reason when i complete the chart...it is only reporting on 7 out of the 10. if i try to do it manually, after i have selected my 7th piece of data, it will not let me select any more.
find attached a copy of my report. Hopefully it does not look too confusing. Note: Sheet "Agent Analysis" works fine...this may give you an idea of what i am trying to acomplish. It is sheet "AUX Breakdown" where i am having the issues.
Conditional Chart Data
I am trying to bring my charting skills up to date, and all I can say is that I am not good. What I am trying to accomplish is a graph where I can choose in the graph ie by a check box which units I want to include. In some instances perhaps I would like all units and in some instances only a couple. Is this possible to do? I have included some data that might be useful to work with.
Sort A Created Labels
I'm a novice at Excel and need some help. We have a local area Dollars for Scholars high school chapter auction coming up and I need to sort the information that has been entered into an Excel spreadsheet (there are several hundred contacts). I need this sorted to create labels to send out donation letters. Last year we used ACT, but the chapter board wants to use Excel so everyone can have the info at their fingertips (since everyone doesn't have ACT). The information was entered in column A like the following (in rows not columns):
Printing To Labels For Years
I created a wedding list with a bunch of fields for each household: first name person 1, second name person 1, first name person 2, second name person 2, street #, street address, apartment, city, state and zip. Then I realized that I probably needed to combine fields for each line of the address so I created 3 combined fields: 'combined 1 ' that looks like this "joe smith & patsy cline," a 'combined 2,' that looks like "14 jones street, #3," and a 'combined 3,' that looks like "New York, NY 10037."
I haven't printed to labels for years and when I did some quick research via the help function on excel it said to print labels via word...which worked fine until i got to this section: " In the Mail Merge Recipients dialog box, click any column labels in your data that correspond to the Word identifiers on the left. This step makes inserting your data in the form documents easier. For more information about matching fields, see Word Help. "
I have no idea what this means, but here's what I need to figure out: " how do I print labels using just 3 of 8 existing columns in my spreadsheet, i.e I just want to use combined 1, combined 2 and combined 3 for the 3 lines of the address. My first instinct was just to cut the contents of the combined fields into a new spreadsheet and just do it taht way, but I created the combined fields using a formula which relates to the other fields........
Setting Up Mailing Labels
I just received a massive worksheet full of information for mailing labels. It's all in columns-which is excel. Is there an easy way to set this up for mailing labels? I've tried to import it into word, but I'm not getting anywhere. Is it possible to change the way excel displays the cells? To a point where I can have the address beneath, then the state, zip, etc?
Values Appear Twice In PivotTable Row Labels
I have a PivotTable that is summarizing a data table. In the configuration panel, I've dragged one column ("C92") to the "Row Labels" area. Likewise, I've dragged the same column to the "Values" area, where it defaults to "Count of C93". So far, so good.
I should mention that my values in column C92 are the whole numbers 0-7 and the string "NA". But in the output chart, each of these values is listed twice! And each count of each value is different! I'm attaching a cut-down version of the spreadsheet that shows this behavior.
Set Color Of Embedded Labels
I have a worksheet with Labels (from the "Control" Toolbox) embedded and I want to read and/or set the BackColor value in VBA. I can't figure out how to accomplish this when they're embedded on a sheet like this.
Dynamic Selection Of Data For Chart
I have a follwing data:
Sheet1 ABCDEFGH2Days12345673Values2040550000 Excel tables to the web >> Excel Jeanie HTML 4
I have plotted a line graph based on the above table; but I am getting zero values also plotted. since these Values are linked to some other workbook I can't delete the cell values also.
How can we avoid Zero values on a graph; Also is there any approach, that my graph should get automatically updated whenever the linked values are updated.
Manipulating Chart Source Data With VBA
I have a chart that I am trying to set up with dynamic data. I have the chart created, but the problem is that I will have a variable number of categories based on the data that is loaded, so I need to use VBA to change the range for the source data and labels on the fly (otherwise, I will end up with 20-50 categories that are all zeroes, putting a bunch of gobbledegook at the top of the chart).
What commands to I need to enter into VBA to get this to work?
I have put a formula in 2 cells to determine based on the current data what the source data values range should be, and what the category labels range should be.
The cell that holds the value range is Graphics!L6, and the cell that holds the labels range is Graphics!L7.
The current values that these cells hold are:
Oh, and the name of the chart is "Chart 1"
What do I need to put into VBA to get the chart to change the data source values and category labels to the ranges I have listed in those 2 cells? (and for that matter, have I listed the ranges correctly in those 2 cells so that they are usable?)
If possible, I would prefer to do this without having to use code to select the chart, because I want the updates to the chart to be invisible to the user.
Plotting Chart To Get Data Values
Say I have a line graph pic in jpeg. Can I plot the critical points (by clicking) on the line graph plot, so as to be able to get the (x,y) data, and thus, have all the data points to be able to re-produce the charts in XLS?
Basically, in other words, I would like to reproduce the line graph in XLS.
Or has anyone developed this kind of application, or can anyone redirect me to the right direction?
Vba - Chart To Align Data Required
I am a PhD student and have a series of coordinates for various DNA sequences. I need to generate an excel chart which will show all the sequences aligned one on top of the other, not like a stacked bar, but where no gaps are found between the bars. So that they appear as if they have ‘fallen down’ as you would see with ‘Tetris’. This would end up with a bell shaped chart, rather than a messy chart. I need to do this to demonstrate which sections of the entire sequence appear more often. Can this be done using VBA or is there a way to modify a chart? I have no previous experience using VBA so I'm close to pulling my hair out.
Making A Chart From Data On A UserForm
I'm trying to make a chart (which will also be on the UserForm) from data that a user will enter onto a UserForm. The problem is that I am trying to select a data range as one of the charts 'series' but I can't quite find the right code. At the moment it looks like this:
ActiveChart.SeriesCollection(1).Values = Range(BMIM20Ttl, BMIM2025Ttl, BMIM2530Ttl, BMIM3040Ttl, BMIM40Ttl)
ActiveChart.SeriesCollection(1).Name = " Total"
ActiveChart.SeriesCollection(2).Values = Range(BMIM2075, BMIM202575, ...
The problem is with the Range function.