Creating A VBA Chart
Jul 8, 2009
I have wriiten some simple code to create a chart which works fine. I have a problem applying formatting to my chart. I am using the With construct to apply the formatting, but the problem is that the chart name keeps on incrementing from "Chart 1" to Chart 23" etc. each time I run the chart and I get an error message before the With code?
View 2 Replies
ADVERTISEMENT
Apr 21, 2008
I have creating a chart. All the information in the source data appears to me to be ok but the chart isn't been displayed.
View 9 Replies
View Related
Aug 8, 2006
I'm not too familiar with VB, and I'm trying to narrow down why my macro (and how) is creating a second, duplicate chart. I only need the chart to be created (and the corresponding data fields on the 3rd worksheet) once.
View 2 Replies
View Related
Jan 15, 2007
I am trying to create a Pivot Chart. My data consist of staff whom had errors in their work done. The data has a time when the work was completed by the staff. I would like to generate a Pivot Chart that has a line chart that shows when the work was completed based on the time and can be sorted easily by team, date, staff ,shift and errors.I know the easiest way is by Pivot Chart. I am not sure how to accomplish this as I had tried with the Pivot Chart and it did not work.
View 4 Replies
View Related
May 20, 2014
I'm trying to show learner progress during our half term collections but the values we track are similar to that below
2B+
2B
2B-
2C+
2C
2C-
1A+
1A
When I attempt to make a chart in the normal format it doesn't recognise the value.
View 1 Replies
View Related
Mar 25, 2014
i am looking at creating a combine chart for 3 variables.how to achieve that?
TeamSubTeamsScore
A X 20
Y 25
B X 10
Y 20
C X 15
Y 10
View 3 Replies
View Related
Jul 15, 2014
I am creating a graph for data that I collected. It was pretty easy to create. The problem is that I want to be able to have certain segments a red color. This is the data that I have
3380
0831
01374
01570
01928
02403
03003
03703
04128
04333
04777
05283
15732
16184
16822
06974
07310
07700
07995
08040
08402
08531
09208
39473
110006
010450
011072
111424
111691
112177
012925
I would like to create a line segment which is easy to do. But I need certain segments to be red. Such as this the line segment between 10006-10450 should be red. And the segment from 11424-11691 should be red too. I have attached my current chart that does not have the red.
View 2 Replies
View Related
Dec 29, 2009
For work, I'm doing a project for Quality Control. I'm looking to create a Bar Chart (horizontal bars) with 2 "vertical" lines to indicate the range of acceptable values
Attached to this Post is a *.pdf that (hopefully) further explains what I'm looking for.
View 4 Replies
View Related
May 2, 2013
I have a bunch of data about companies in an Excel workbook. I need to be able to create a "summary document" about a selected company in word. One of the items that needs to be in this summary is a pie chart.
This code works fine for generating the basic text of the document:
Code:
Sub export_to_word()
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim companyName As String
Dim address As String
Dim revenue As String
[code]....
Creating the chart has been more problematic. I adapted the following code from an example found on MSDN:
Code:
Dim valueChart As Chart
Dim chartWorkSheet As Excel.Worksheet
Set valueChart = wrdDoc.Shapes.AddChart.Chart
valueChart.ChartType = xl3DPie
Set chartWorkSheet = valueChart.ChartData.Workbook.Worksheets(1)
chartWorkSheet.ListObjects("Table1").Resize chartWorkSheet.Range("A1:B12")
[code]....
What I've found though is that this code is based on a macro inside the word document, not excel. So it runs fine from within word, but within excel it throws an error at this line
Code:
Set chartWorkSheet = valueChart.ChartData.Workbook.Worksheets(1)
because ChartData is not in the object model in Excel. how to proceed at this point.
View 1 Replies
View Related
Mar 10, 2014
My chart is coming in blank when I set up a line chart. This is my data that I selected and then pressed chart. 1997
63.9%
1998
63.2%
[Code].....
View 9 Replies
View Related
Jun 12, 2014
I have a column with values​​:
15 1 16 11 2 15 31 30 26 49
Need to build a diagram, like parabola.
Once again, the task:
For example, we have a number 2, 5 and 10. It will hit 1-2 3 times, 2 times 3-5, 6-10 1 times.
And that we get a parabola.
Example:
How to do it?
View 1 Replies
View Related
Jul 7, 2014
I am working on an excel macro for work to work with data processing. Basically, it takes a bunch of CSV files and creates a workbook with each file as a new Worksheet; then it has the user enter some calibration data; and finally fills a column with the calculations to convert the data into the correct units. I would like to get it to put an XY Scatter chart of the data on each pages, but I'm having some problems with it. I recorded a macro to get an idea of what the code should look like, but when I put it into the macro I'm writing it places all of the charts on the last worksheet.
Here is the code that I came up with for the chart generation:
Code:
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlXYScatterLinesNoMarkers
ActiveChart.SetSourceData Source:=Worksheets(i).Range("D:D,F:F")
Columns D and F are the two that contain the data that I want to plot. In my macro this is running inside a look so Worksheets(i) is selecting the correct ranges on the correct worksheet. I think my problem is that after the merged workbook is created it is defaulting to the last worksheet being the ActiveSheet, and I don't know how to change that.
View 1 Replies
View Related
Feb 16, 2010
I am not sure if this is possible. I wish to have a chart in a worksheet linked to a stock chart on a webpage.
For example, consider this chart on Yahoo Finance. At present every week, I have to go to the webpage and copy the chart and then paste it into a worksheet.
Is there a way I can automate this task by linking the chart to an Excel object or by any other way?
View 9 Replies
View Related
Oct 20, 2006
i have this data.
WeekFRM CURRCY Account val val2 val3 val4
42100¢BBHBANK403522
43100¢BK200 001310
44100ABBHBANK3013
45100ABK200 9043
46100CBBHBANK10106
47100EBBHBANK903420
48100EBK200 503527
How do i get this into a chart, with week along the bottom, Amount on the left. This is starting to be a pain now as i need to seperate by currency, but a pivot chart looks really realy messy with all the drop down boxes and stuff. I dont mind using drop don boxes, in fact, its going to be essential. but the pivot one look horrible.
View 5 Replies
View Related
Jan 18, 2009
I am using the VBA Chart Control and I have the following instruction;
Me.ChartSpace1.Axes(ChartAxisPositionEnum.chAxisPositionCategory).Numb erFormat = "mm/dd/yy"
The chart is a "chChartTypeLine". the problem is that i cannot change the format of the X-Axis to a Date (mm/dd/yy) format no matter what I try? I keeps wanting to keep it as "General", here is the code;
Private Sub CommandButton1_Click()
Dim ser As ChSeries
Dim cht As ChChart
Dim MinValue As Double
Dim MaxValue As Double
MinValue = Sheet1.Range("D2").Value + 10
MaxValue = Sheet1.Range("A2").Value
View 9 Replies
View Related
Aug 25, 2006
I have a line Chart and want to create a static horizontal/indicator line.
I cannot create a new series to plot this horizontal line as I'm using an external data source (OLAP cube) as source data for the chart.
View 8 Replies
View Related
Apr 26, 2014
I am creating a chart with more than 2000 dates (each day). How can I format the axis so it only displays the 1st day of each quarter (01/01/2010, 01/04/2010, 01/07/2010...).
At the moment I cannot format the axis and minor/major units remain numbers.
I am using Excel 2010 and European date format.
View 2 Replies
View Related
May 28, 2014
I am trying to create a dynamic Excel line chart.
All is well, except for my x-axis (which is a text axis). It currently looks like this: Dynamic axis.jpg
I am using the Offset formula. The formula for my x-axis is =OFFSET(Worksheet1!$D$4,0,-3,COUNT(Worksheet1!$D$4:$D$36)). This is to show the axis if cells in Column D are filled up appropriately.
However, in the cells containing the axis name itself, this formula is used =IF(D9=0,NA(),'Worksheet2'!A6). I've tried removing the formula from these cell, but that didn't solve the problem.
View 5 Replies
View Related
Nov 3, 2011
I am trying to automatically generate an organisation chart in excel from a dynamic list of employees. in column 'A' will be the "manager's name", column 'B" will be the "employee name", column 'C' will be the "employee number" & column 'D' will be the "employee days" number (an potentially a few more employee attributes)
I would like a printable org chart that is created on another tab which is generated from this list, ideally with the "employee name" and their other attributes shown in the chart.
how this can be done in excel, maybe VBA?
View 3 Replies
View Related
Apr 3, 2012
Is it possible to put in Trend Lines when creating a stacked column chart?
I've tried in Excel 2003 and 2010 but it doesn't appear that it is possible.
View 3 Replies
View Related
Oct 12, 2012
I am doing an ANOVA analysis of survey results for a set of products, and would like to present a chart to graphically represent the results.
View 1 Replies
View Related
Dec 16, 2013
I have a table that can at any point have from a couple hundred up to a couple thousand rows. Within this table lies a column entitled " Offer ". I want to plot the figures in the offer column as a frequency distribution chart.
I plan to do this by listing the x-values (Offer figures), and then using count if formulas to calculate the frequency of that x-value. Then using a simple clustsered column chart to create the visualisation of the frequency distribution.
My question is.... in my large data set, is there any way to get VBA to insert a list of the range of figures in the Offer Column, ? I can figure out how to copy down the countif formula to populate the corresponding frequency column, but how can I have some VBA to dynamically adjust my x-values (offer figures)?
For example... say in the first data set I have
Offer, Frequency
1 10
2 20
3 25
4 20
5 15
that's fine if I make the chart, but what if the data set changes, I want VBA to give me a list of all the offer values, and then I can write some code to insert and copy down along the frequency column the countif formula.
The ultimate goal is to have a frequency chart that will be synced to the self-updating dataset.
View 1 Replies
View Related
Oct 22, 2011
I'd like to use two columns / labels to create a colorful bar chart that just piles each field value on top of each other and shows the amount (and percent of total if I can) along the first column's values next to the bar chart something like below..
So column 1 is the "entity name" and column 2 is the "value/amount".
I can't make this chart look right at all. I have Excel 2007.
View 4 Replies
View Related
Jul 12, 2013
How do I paste the first chart into the second chart but maintain the format of the second chart?
View 2 Replies
View Related
Jan 14, 2014
I need to plot various data on top of stock charts.
This data could be irregular in date: it could be weekly, or simply random.
To plot this data by itself requires a Scatter Chart.
From what I know so far, you CANNOT DO THIS.
However, I suspect this could be done if I build a Stock Chart from scratch using a Scatter Chart.
Error bars can be used to make the tails, however, I don't know how they built the body bar which has the characteristics of a bar (border, and interior.)
But since I don't really need those two characteristics, I just need a wider error bar line that is provided in the chart edit window. I'm guess through a macro, there are wider line widths assignable.
View 5 Replies
View Related
Feb 24, 2007
I know this has been discussed a number of times, but here is my problem
I have three charts in my workbook. I want to attach a macro so that when the chart is clicked it returns to Sheet - Home. I have using the following:
worksheets("Home").activate. But after I protect each chart and the workbook, and save and exit. When I reload the Workbook it has forgotten the assigned macros and nothing happens.
View 7 Replies
View Related
Nov 27, 2011
I am looking for a creative way to display a pie chart within a data point marker of a line chart.
My database has 3 value columns, Type1, Type2 and the Total (Type1 + Type2)
these are recorded per day (Date, in Column A)
I have a line chart that displays the total by date, but I want to find a way to display the percentage split of a particular day by type.
I was thinking to load the chart image into the Data point marker, but i don't think that is the best way as the data is updated daily and I would have to do it each day for a few line charts.
The other way I was thinking about was to have a generic Pie chat in the Line chart (Maybe in a corner) and the pie would update depending on way date series was selected or Mouseover'd)
the way that I am approaching it at the movement (Not the best way and by far not the coolest way. Is to have a list of all the dates in a column next to the Line chart and using some VBA, what ever date is selected in the column the pie chart displays the corresponding data. But eh challenge is that when there is alot of dates, I am going to be scrolling up and down.
I am using Excel 2010, but I cant not use the slicer's as the other users do not have 2010, they have 2007.
View 1 Replies
View Related
Dec 29, 2011
I have a spreadsheet created in Excel 2003 (which is what we use at work, unfortunately).
My employees periodically take a test to ensure they have certain items memorized (or are making progress to that end). The spreadsheet rows show all 46 of my employees, and their test scores. The columns are the dates that the tests are administered. I can create a line graph based on the chart data, and interpolate these data with no problems.
The problem is that there are 46 employees! 46 lines on the same graph make for a very cluttered, hard to understand visual. I want to simplify the view by "filtering out" some of the data.
I have an additional column in my spreadsheet for each employee's work area (Area 1, Area 2, etc), and another column with data based on first letter of last name (the values here could be "A-G", "H-M", "N-S" and "T-Z", for example). I figure i could filter my line graph based on these two columns. For example, somehow select just Area 1, and reduce the number of lines on the graph to 16. Or better yet, Choose "Area 2" AND "A-M" and end up with 7 employees (and therefore 7 lines on the graph).
Here's what i have tried:
1) Select the work area column, and use the Filter, which created a drop-down list at the column heading. When i use this drop-down list, i can easily filter the data in the worksheet by Work Area, but this is not reflected in the line graph, which still shows all 46 lines. The problem was that i forgot that i had set the Calculation Options to "Manual". Setting this to "Automatic" (or leaving it on Manual and pressing F9) solved the problem, as the chart now updates when i use the filters. Calculation options are under the "Formula" tab in 2007, or in Tools -> Options -> [either calculation or formula, i forget what it's called] in 2003.
2) Create several separate line graphs in several separate sheets. I wouldn't want to assign someone else the task of maintaining a spreadsheet of such inefficient design.
View 1 Replies
View Related
Jul 14, 2012
I have created a population pyramid and want to add another chart on the secondary axis which I can do. The part which I seem not to be able to complete is getting the line chart secondary axis to read from the primary y axis. It seems to add a new axis, even when I delete this the line chart does not read correctly.
View 1 Replies
View Related
Apr 18, 2013
How can I add missing values to the axis in a pivot chart line chart? I have a numerical X-axis with values such as 0,1,5,8,14, etc. I have another set of Y values that correspond to the X values. If this was an XY-scatter plot I'd be able to plot X vs. Y and connect the dots for "gaps" in the X values. Since it's a pivot chart I cannot use an XY-scatter plot, I can only use a line chart. The line chart doesn't give me the ability to add the "missing" values, so it gives the impression that my data is more closely packed than it is. The data source is external to my spreadsheet, so I cannot add the values before creating the pivot table/chart.
View 1 Replies
View Related