Create Graph Using VBA
Oct 14, 2008
I want to create excel graph using VBA and found difficulties on chart name set to default.
the script is like this :
ActiveSheet.ChartObjects("Chart 31").Activate
Can I set my own name of the chart instead of "Chart 31" (excel default) ?
View 9 Replies
ADVERTISEMENT
Sep 28, 2004
Trying to create an N1.85 graph in Excel that has irregular spaced tick marks on the X-axis. Found the following information but no luck with it. Need US measure for this semi-log (10 X N1.85) graph. Also called a semi-expo (Q1.85) graph.
The resulting graph appears to be a log graph in reverse with one scale; the column widths are smaller at the left and become larger as they progress to the right.
Info found:
A 1.85 graph can be constructed manually by establishing a series of 15 values (in the case of the example in D5.2.1) from a base measurement to the exponent of 1.85.
Step 1
Select a base measurement for the desired size of the graph. A base measurement of 1.0 mm will produce a graph to 15 which is approximately 150 mm wide; a base measurement of 1.5 mm will produce a graph approximately 300 mm wide. In the case of a 1 mm base measurement, the x-axis numbers will be the 1-15 series. In the case of a base of 1.5 mm, the numbers will be represented by the series: 1.5, 3.0, 4.5, 6.0 etc. for 15 values.
Step 2
Construct a series of columns to the 1.85 exponent values measured from the zero point. The rows representing the pressure values are linear.
NOTE - A good approximation of the above can be computer-generated by a spreadsheet programme by entering a column width established from the exponential figures by subtracting the preceding value in each case. The column dimensions are displayed in the number of standard characters able to be accommodated in the column width which is slightly inaccurate in linear dimension.
The figures below indicate the values for a graph based on 1.0 mm.
Linear scale Exponential value of linear values = Column width = linear values to 1.85 power exponential value - preceding value
1 1 1
2 3.61 2.61
3 7.63 4.03
4 13.00 5.36
5 19.64 6.64
[Code]....
View 6 Replies
View Related
Feb 26, 2014
Data or a case that can't be created a 3D bar graph from? I've been told there is just a little of data that can NEVER create 3D bar graph.
View 2 Replies
View Related
Nov 30, 2005
What can I have the IF statement return as a result that will NOT graph at all. Just leave a hole in the graph.
Long Question:
I have a large range of values and dates.
1/1 1/2 1/3 ....etc
10 11 7 .......etc
8 12 6 .....etc
These values are pulled via VLOOKUP() from various places. When VLOOKUP finds a blank cell, it returns a '0', which doesn't work for me. I've added an IF(ISBLANK), to return "", which is (I believe) an empty cell. The problem is, this is still graphing as a zero. So it will be graphing along nicely, and then shoot down to zero and back up again.
View 9 Replies
View Related
Jul 6, 2009
Rep NameCall StartedDuration h:mm:ssRep 12:19:18 PM0:00:36Rep 13:09:01 PM0:00:56Rep 13:11:01 PM0:01:05Rep 13:12:12 PM0:01:13Rep 13:26:26 PM0:00:39Rep 27:08:35 AM0:01:57Rep 27:16:32 AM0:02:12Rep 21:47:17 PM0:02:01Rep 37:05:01 AM0:10:37Rep 37:36:24 AM0:00:16Rep 311:41:43 AM0:15:21Rep 312:47:36 PM0:00:46Rep 31:45:36 PM0:02:19Rep 31:49:54 PM0:00:32Rep 31:51:46 PM0:00:56Rep 31:55:03 PM0:00:35Rep 31:59:26 PM0:00:22Rep 47:04:24 AM0:00:16Rep 42:40:41 PM0:00:08Rep 43:06:22 PM0:02:16Rep 43:21:35 PM0:00:04Rep 43:21:49 PM0:03:05
which is the time that any rep started a call and the duration of each call
and i need to make a graph from it that kind of looks like this:
(not actual data)
this way you can clearly see that for the most part rep 3 was the most productive however only rep 2 was on a call after 2pm.
i need this report to see tendencies on how much time is wasted on meetings and such keeping the reps off the phone.
View 9 Replies
View Related
Mar 12, 2008
How can I create a box chart showing graphically a median, 1st and 3rd quartile and a minimum and a maximum?
View 5 Replies
View Related
Jun 28, 2006
I am wanting to create a yearly graph, but it isn't allowing me to add cells from multiple worksheets.
View 1 Replies
View Related
May 29, 2008
I need to plot a stacked chart. I have attached a sample of it. I need to plot, category As X and subcategory and and its percentage as Y (stacked chart). In the attached sample I plotted a chart. The problem is, the series name showing is not correct. It takes the series name from the top row.
View 5 Replies
View Related
Apr 16, 2014
I have a table of data which contains company names, the number of high risk policies, number of low risk policies, and the percentage of high risk policies (compared to total policies).
What I want to do is for people to be able to select up to six of these companies and press a button that says 'create graph' and it creates a graph which shows the number of high risk and low risk in a stacked bar, and the percentage on a separate axis as a line. I know how to manually create this graph no problem, but to be able to dynamically create one from selected companies would be awesome.
To start with I have created six drop downs where you can select the company name as I image the macro will need to know which companies' data to look for in the source table.
View 3 Replies
View Related
Jan 9, 2012
I'm looking to create a graph where the data source is two columns:
Column A (From A2 down to last but one populated cell)
Column ? (Last populated column on the right, from ?2 down to last but one populated cell.
all I have at the moment is the generic code for creating a graph (which I reverse engineered from a macro I recorded).
Code:
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("1_bth_x_wk").Range("A1:H40"), _
PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="1_bth_x_wk"
View 9 Replies
View Related
May 2, 2014
I have a macro code that will create line graph referring the data given in defined column A1-C4,
Code with Static column range:-
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("'Sheet2'!$A$1:$C$4")
ActiveChart.ChartType = xlLineStacked
I tried to modify the above code, so it will refer undefined/dynamic data column, but getting an error during execution "Run Time Error - 424:" "Object required"
Code with Dynamic column range:-
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=ActiveSheet.Range("a1", _
ActiveSheet.Range("a1").End(xlDown).End(xlToRight)).Select
ActiveChart.ChartType = xlLineStacked
View 1 Replies
View Related
Apr 25, 2008
Can I build/present a "Pie" chart DIRECTLY from a list of "ABC" letters WITHOUT counting the occurrence of each one of them and using the results [nor VBA / nor Pivot-Table] - which is the trivial way of building charts !?
An example of such a list will be:
A
A
A
B
B
C
C
C
C
C
View 9 Replies
View Related
Sep 29, 2011
I have used sumif statement to set up a value by week and then used the drop down list cell reference to display what i want ie week 25 data
What I would like is to display the 8 previous weeks and then use this in a graph, so every time i change the drop down week I see all the data showing the current week and previous weeks.
Now the problem is which formula do i use to to identify previous weeks
ie
WK No 21 22 23 24 25
Visits 100 200 250 300 400
View 1 Replies
View Related
Jan 6, 2012
Ok, so here's the trick:
I know how to create combo or mixed graphs with line/bars on single axis, and secondary axis. I even know how to do mixed stacked and unstacked columnar charts...
But how do you depict in single view graph
a single bar (1 datapoint) with a single line (upper control limit e.g. target).?
And I don't want to to use shapes to draw the target line.
I want the target line to be automatically plotted by Excel...
View 9 Replies
View Related
Aug 5, 2013
I'm trying to create a line graph to show the trends of usage. I have a list of dates that I pulled from a website. I am trying to create a function that will count the number of dates between, for example, 8/5/2013 and 8/11/2013.
I had tried using this function to create a set of weekly ranges. =TEXT(DATE(2013, 1, 7)+(ROW(2:2)-1)*7, "m/d/yyyy h:mm AM/PM")&"-"&TEXT(DATE(2013, 1, 7)+(ROW(2:2)-1)*7+6,"m/d/yyyy h:mm AM/PM")
It correctly displays the date ranges, however when using this function:
=COUNTIF($E$2:$E$305, A2) Nothing gets pulled.
Here is one of the dates that has been pulled for example: 8/5/2013 11:10:00 AM
View 5 Replies
View Related
Jul 4, 2006
I want to do is use a userform to automatically create a graph from the data that is shown in the worksheet. The data in the work sheet will grow and shrink all the time. Am i right in thinking I am meant to create a dynamic range? I know how to do it but am not too sure what I am meant to be naming. And secondly I am not too sure how I set up the button to produce the graph.
View 4 Replies
View Related
Jan 14, 2014
I am trying to create a graph where the date starts on July 1st and runs through a full year to June 30. No matter how I sort the dates in the cells, the graph still wants to start in January. You will see from the attached picture the very right lines up with the very left, where these should actually be meeting in the middle. as to what I need to do? Please see photo and dataset.
Chart.jpg
DataSet.xlsx
View 3 Replies
View Related
Apr 7, 2014
I want to create a dynamic line graph using week and year numbers stated in another sheet.
e.g.
Start Year - 2012
End Year - 2014
Start Week - 3
End Week - 12
The top 2 rows above my graph data are as below:
Year - 2012 2012 2012
Week - 5 6 7 etc.
This works fine if the start and end year are the same but if it's greater than one year, it doesn't recognise that.
View 7 Replies
View Related
Mar 20, 2014
Excel 2010 - I need to create a graph that shows a week's use of a sportsground showing what sports were played, on which days and between which times. I thought I could show the times on the vertical axis, days on the horizontal axis and then the sports played in those times, however I'm unsure as to how to get the graph to recognise the times.
I've attached an example of some data and how I'd like to see it, I'm just not sure how I can do this using the chart set up!
Attached File : Graphs.xlsx
View 10 Replies
View Related
Sep 27, 2011
I am trying to create a line graph that will incorporate multiple columns of data in one series of data. The reason I do not place all of the data in one column is because it could exceed the maximum amount of rows allowed in excel. Also I need the data split up for viewing purposes.
I can easily just graph one column but how do I combine all the columns into one line graph with the data being in separate columns. Basically all the columns will be my Y values and X values are just 1:n.
Example Below:
Column AColumn B Column C159261037114812
Now in the example all of the values are x values.
View 2 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
Dec 10, 2012
I need to create a graph with a 2 x axis and a single y axis. For example:
Pressure ( PSIA) Solubility (mol %) Velocity (m/s)
200 0.024 1
300 0.036 1.2
400 0.041 1.8
I need the two x axis to be pressure and solubility and the y axis to be velocity, with the data being demonstrated by a single plot (I have only managed it with two plots which does not demonstrate solubility's relationship to pressure ).
For example at a pressure of 200 PSIA (lower x-axis) and solubility of 0.024 mol % (upper x-axis) velocity was found to be 1 m/s.
View 1 Replies
View Related
Mar 21, 2014
I would like to make a scatter graph that will graph the attached. The score would be on the Y axis and the birth date would be on the X axis. This is simple to do by itself but what I would like to do in addition to this is to have the top 25% of the scores a single color, the middle 50% of the scores a second color and then the bottom 25% of the scores to be a third color. And if it is possible to have the ID visible when you move your cursor over a given dot in the graph. Currently when I make a scatter graph the X,Y coordinates show when I hoover the cursor over a dot.
View 7 Replies
View Related
Jun 11, 2006
How can i make a graph that will graph against time? lets say i have a bank balance like this:
1/2/2000 $500
1/3/2000 $600
3/12/2000 $400
there may be more than one entry on any one given day, or there may not be an entry for 2 weeks. How can i graph the running balance in a way that it will show the timeline just as a calendar year(or however long i selected) and the points are plotting according to their date, not just equally spaced out.
View 2 Replies
View Related
Dec 30, 2008
I want to use a line graph to display an amount over time - that's the easy part. On the other hand, I would like to have to group the lines based on a value.
A short example:
Imagine you own 3 different stores and you're selling oranges. So your table looks like this:
http://img179.imageshack.us/my.php?image=orangeshm4.jpg
Now I'd like to have one graph (3 different graphs won't work as the rows increase -I need to select the whole column as data source):
Date on the x axis,
Oranges sold on the y axis,
and one line per store (e.g. a green one for store A, a red one for B and a blue one of C, doesn't matter).
View 2 Replies
View Related
Feb 12, 2014
I need to create a macro that can create a dynamic copy/paste loop. So far what I have is horribly inefficient. Each row in colmn A(minus the header) has a unique number in it. For each unique number, I need to paste it based on the number of column headers in row 1(minus column A). So, if there are 20 column headers, I need to copy cell A2 and paste it 19 times in another sheet. Then, I need to move to the next number in column A and do the same thing. Here's what I have:
[Code] .........
You can see that this is not dynamic. If I add another row to my table and rerun the macro, it will not catch it. I've attached a sample file to show you the big picture of what I'm trying to do. The data that I have is in Sheet1, and I'm trying to get it into the format in Sheet3. Rows/columns will be periodically added to the table in Sheet1, so the macro needs to be dynamic to catch that. The data in Sheet3 will always remain, and the macro will add the updated data below the old data in Sheet3.
FC_Macro_Sample.xlsm
View 8 Replies
View Related
Jan 14, 2009
So I've got Sheet 1 with say
____A___B___C
1___m___i___c
2___r___o___s
3___o___f___t
I would like to create a button that can create a new sheet and paste A1 to C3 at the same location on the new sheet
and I need this to create a new sheet and do that everytime the button is pressed.....
View 11 Replies
View Related
Aug 7, 2006
Trying to create an excel chart to create totals based upon different keys. I
need to be able to calculate how many customers there are by Manager and then
By Rep. Then to figure out how many were New, Current, Total # of RSVP and
attended for that Rep. Below is how I have started but I am having some
problems getting certain parts. I know when I get one the rest will fall into
place. I can calculate how many total customers by manager and by rep just by
doing a Countif command but how do I determine the # of New, Current etc. Is
there a If Than command? Managers Totals are simply his reps totals.
Example..
A B C D E
F G
1 Manager Rep Customer New Biz Current # RSVP # Actual Attend
Need totals to look something like this....
A B C D E
F G
1 # of Cust # New # Current #RSVP #
Actual Attend
2 Manager
3 Rep 1
4 Rep 2
View 15 Replies
View Related
Nov 11, 2009
I have a X-Y graph with 602 data points. My x scale is a counter from 1 to 602 and the Y is a decreasing set of numbers. When I hover my mouse over the points on the graph (I zoomed the graph) My first 3 points are all labeled as Point "1". At the end of my graph, my last 3 points are labeled 599,601,602, it skips 600.
I am using Excel 2007. Has anybody seen this before?
View 9 Replies
View Related
Jul 17, 2014
I am creating a graph with a wide range of values (0.06 - 300). The smaller values are barely visible on my column graph. I have tried all of the tricks I know. Any way to get the smaller values to show up instead of just hovering towards the bottom of the graph?
View 9 Replies
View Related