VBA Plot Two Ranges In Different Colors In Same Graph
Oct 4, 2013
I have two ranges of cells containing names of chemicals, call the first one "Product" and the second one "Byproduct".
Also, there are two other ranges of cells, called "Productvalue" and "Byproductvalue". These cells contain the numerical values of products and byproducts. How can I plot both the products and byproducts in the same graph using xlBarClustered in different colors?
View 1 Replies
ADVERTISEMENT
Feb 19, 2014
I'm trying to find a way to alternate between two colors (white, grey, for example) in a stacked columns plot. Each stacked column should begin with a grey layer then white, then grey and so on. These plots will be created and changed frequently so I cannot manually do this every time.
View 1 Replies
View Related
May 5, 2008
I have to create a chart XY Scatter plot in excel. I have to differentiate the data points color based on the another column "category". Now I can change the data points color manually. Since the number of points is huge, is it possible to color the data points based on a column?
View 5 Replies
View Related
Jun 9, 2014
How to plot a step graph?
I have attached a drawing by illustrating the graph that I wish to plot.
Attached Image : jpg Capture.JPG
View 9 Replies
View Related
Jun 3, 2014
I have a pareto for a manufacturing facility that has a list of nonconformists and their occurrences in columns K and L. My issue is since it is a running total for the year at certain times the values are 0 for the number of occurrences. This calculates fine, but the graph is very large and the failures are all located on one side instead of being evenly distributed. I am trying to get it to only plot for what has occurred and not have a bunch of blank values. To make it a little more complex I'm trying to avoid macros.. I can get them to show up blank just can't get the bar graph to resize itself to fill the chart.
View 3 Replies
View Related
Mar 27, 2014
I'm stuck at a point in a graph that I am creating. Attached is as far as I have gone and now i'm having a gap on how to take the 2006, 2007 which is already in graph and add in how these years compare to guidelines visually in the same graph?
for instance ratings 1-9 are grouped in guidelines 1-4, 5-7 etc. How do i add in the 3 guides against each point? I have thought about adding a secondary axis but not how best to demonstrate the range of 1-4 to appear behind or above those points?
View 1 Replies
View Related
Apr 14, 2014
I would like to create a chart in vba which contains 2 sets of data, both using the same x axis. The first must be a line graph, the second a staggered bar chart. This must be represented on one chart with data labels. Also, how do I change the colour of the plots?
View 5 Replies
View Related
Nov 20, 2013
Given 100 samples, to calculate: numbers of hours spent on study is dependent on numbers of hours spent on social networking site.
x (social networking site)
y (study)
x^2
xy
6
4
36
16
24
[Code] .......
SUMMARY OUTPUT
SUMMARY OUTPUT
Regression Statistics
Regression Statistics
Multiple R
0.571423290877713
[Code] ....
So, I've got the coefficient of correlation equals to 0.57, how can I plot my scatter graph?
View 1 Replies
View Related
Jul 26, 2007
I need to know, can I plot a graph (ongoing plotting each value) from just ONE single cell which constantly updates it's value? (I have a third party datafeed hooked up to one single cell in Excel 2000 [yes, the old one ] and it updates quickly in realtime automatically throughout the day). But I need to trace the history of the values, plot a graph of all the values which ever show up in that single, in other words.
Also, I need to date and time stamp each new plot on the X axis of the graph (only when a new figure appears in the cell). So, for example, my one and only "datacell" (say, A1!) which is linked to an external datafeed is showing "145.87541" at 12:30:45 on 27/04/05. I need that time and date on the X axis which the number as the plot. Then that cell changes value 2 seconds later to "145.87587" at 12:30:47 on 27/04/05. Now I need that second plot on the graph at the correct time/date stamp so I am constantly plotting the history of the value onwards (potentially forever!) using just that one, automatically updating, cell.
View 9 Replies
View Related
Oct 20, 2006
one of my excel reports, i am using a dsum formula and plotting a chart against it. i do not want to show the zeros on the graph, is there anyway i can do that, i could not find anything in the tools -> options.
View 2 Replies
View Related
Jun 5, 2008
Im working on a graph that uses the code below to plot the series
Sub AddDataToMyChart( Name As Range, XData As Range, YData As Range)
With ActiveChart
With .SeriesCollection.NewSeries
.XValues = XData
.Values = YData
.Name = Name
End With
End With
End Sub
Sub Test()
Dim lngTopRow As Long
Dim lngBottomrow As Long
Dim lngCol As Long
lngTopRow = 3
lngBottomrow = 8
ActiveSheet.ChartObjects(1).Activate
With ActiveSheet
For lngCol = Range("D2").Column To Range("h2").Column Step 2
AddDataToMyChart .Cells(2, lngCol), .Range(.Cells(lngTopRow, lngCol), .Cells(lngBottomrow, lngCol)), _
.Range(.Cells(lngTopRow, lngCol + 1), .Cells(lngBottomrow, lngCol + 1))
Next
End With
End Sub
...
View 4 Replies
View Related
Aug 18, 2006
how can i plot multiple series of values in one graph after checking some check boxes, which i have previously done, randomly?
View 4 Replies
View Related
Aug 1, 2008
I have the following list of values which I want to plot as a zigzag. But when i create a line chart from them, the lines connect the zeros and the non-zero points - while I want the lines to connect only the non-zero points - so that there is a zigzag-like pattern shown.
the Data:
0
0
0
0
0
1.4343
0
0
0
0
0
0
0
0
1.4332................
View 6 Replies
View Related
Feb 12, 2014
This is probably very simple but I'm having a problem finding how to change the color of a bar based on the value. For example, when the bar reaches 100% I want the bar to turn green while the other bars in the graph stay the same.
View 2 Replies
View Related
Oct 24, 2008
I have attached 2 files. One of them is called Macca.xls. This is the file that was created for me by shg on an excelforum. The other isOreDep_updated.xls - this file is the updated list that I want to convert into the Macca file or make it look like the Macca file.
I awas trying to make a couple of plots, but they were not llooking like some examples I have.
In the OreDep-updated file attachment is my data I needed to use. I needed to make 2 plots:
Plot 1: Resource Grade (log scale) against the proportion of deposits (linear scale)
Plot 2:Tonnage (log scale) against proportion of deposits (linear scale)
This was done with my old data that is shown in the Macca.xls attachment.
They are meant to cumulative proportion plots. As a line or scattergram. An example of what they are meant to look like is at: http://www.nbmg.unr.edu/dox/ofr962/c11.pdf on Page 4 and 5.
shg managed to make them look like I wanted with the log normal smooth line too.
My problem now is that I want to change the data under Name, Resource Tonnes and Resource Grade (basically replace the old data in Macca.xls with the new OreDep_update.xls, to come up with same type of plots). But whenever I try to copy and paste the data into the Macca file it messes up everything. I looked at the formula that was created and I really havent a clue how to change it, without affecting everything else like the plots.
I also need to add 2 new columns for date and for reference, and it wont let me do that.
View 9 Replies
View Related
May 9, 2008
I have several worksheets with thousands rows (independent variables) and hundreds columns (all dependent variables). Each line basically gives me hundreds values for each independent variable - see below:
...
C9 39.65 653.95 5.28 163.56 99.56 14.49 ... ...
E9 7535.92 21500.56 2835.88 3122.98 7225.34 5371.25 ... ...
G9 111568 298021 12940 31645 181797 36996 ... ....
...
I need to know how the values in each row are distributed, and I ideally plot a 2D column graph of the distribution. Is there a way to do that and create/program a macro (with relative button on the workboook) that does it automatically once clicked?
Very often there are outlying values (bigger or smaller by a factor of 1000 or even more), mistakes, which I would like to identify and fix possibly.
View 9 Replies
View Related
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
May 15, 2009
Is it possible to create a chart based on value from a drop down?
The drop down has two values which are both named ranges.
There for I want to be able to choose from the drop down whether to display data per team or per agent.
View 9 Replies
View Related
Oct 19, 2012
I have 2 datasets that have a common y axis and was wondering if it is possible to graph them?
i.e. x axis A - hourly wage costs
x axis B - hourly sales
y axis - hours of the day
View 1 Replies
View Related
Apr 25, 2008
I have a database in excel with a lot of tables in which lets a uses a combo box so the user select can view just one table.
I want to be able to create a macro so when a button is pressed, it copies the data into a new workbook and creates a chart so they can do whatever they want without disrupting anything in the original workbook.
I have been able to find code that will export the data and create a chart (see below) but the problem is the range changes from table to table so I need to find a way of changing how the chart picks up the data range.
Sub Chart_New_Book()
Sheets("Temp").Select
Cells.Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Range("A1").Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:C10")
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
End Sub
So at the moment when charting ony cells A1:C10 will be plotted no matter what the size of the table is and making the target range bigger only sees the blank cells being plotted.
View 3 Replies
View Related
Jun 26, 2009
I would like to build a Macro to delete units (ex: 10V --->10) of two cell ranges that are not beside each other and eventually automate it to graph these two ranges because I will be running samples and have to produce a graphs for each sample.
I tried the code below, but I can't figure out how to include 2 ranges without deleting letters in other cells in in between the ranges.
for ex: I want to delete the non numerical characters in the two ranges C3:C1000 and H3:H1000 and graph these ranges.
View 5 Replies
View Related
Jul 7, 2013
My pallet lost color-coding - if I hover over each little scare it displays the names for the colors and if I click on them they color the cells with the right colors, but the palette itself lost the visual display of colors except for 8 colors: black, blue, red, magenta, yellow, cyan, and white.
I use color-coding of cells a lot and I find it difficult to work without visual clues. At least the hover-support allows me to get the work done, but with difficulty.
View 12 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
Apr 19, 2006
In the attached sheet I have data in column F and G which I am plotting using the following
Sub evmplot()
Dim i As Integer
ThisWorkbook.Worksheets("sheet1").Activate
ActiveSheet.ChartObjects("EVM").Activate
ActiveChart.ChartArea.Select
For i = 1 To 15
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(i).XValues = "=sheet1!R[" & 5 + (i - 1) * 13 & "]C6:R[" & 17 + (i - 1) * 13 & "]C6"
ActiveChart.SeriesCollection(i).Values = "=sheet1!R[" & 5 + (i - 1) * 13 & "]C7:R[" & 17 + (i - 1) * 13 & "]C7"
Next i
End Sub
when I =1 , the sereis should be from R5c6:R17C6. But the first series in the plot is from R6C6:R18c6. Same is the case with other series also.
View 2 Replies
View Related
Sep 29, 2006
This may sound like a dumb question, but hang with me. I have two series in an xy plot. One is a line (withOUT markers) and one series is just markers (no line).
The line without markers is created in a way such that it forms a box and whiskers plot. The other series, are trial values that go into the box and whiskers.
I have desperately tried to get the second series (just points) to plot BEHIND the first series (line, no markers). Changing the series order does not work unless both series have lines. I have tried this in a variety of ways (including writing a macro which draws the markers first, and then the lines), but that doesn't work either!
View 7 Replies
View Related
Mar 30, 2014
I am planning on creating a map of a badminton court. I am hoping to record each hit of the shuttlecock with a dot on the map. Of course I want this to be inputted by data rather than manually inserting a circle shape and placing it in the correct location each time.
is there any way to do this in excel?
View 14 Replies
View Related
Jul 9, 2014
I would like to make a histogram using excel. I have successfully made the bins and frequency functions. Once I want to add the x values, I get an error. There are many examples online, but I can't get it to work.
[Code] .....
View 1 Replies
View Related
Mar 15, 2012
I have data that starts from say, 17:50 hours. However, I would like the chart to start from 00:00 to 00:00 so it is a full 24-hour period. So up to 00:00 to 17:50 hours, it would be blank then the data will be plotted from 17:50. How do I do this? If I select the existing data from 17:50 and ask Excel to create a chart, the x axis starts from 17:50 (not 00:00).
View 4 Replies
View Related