How To Plot 2 Chart Types On One Graph In VBA

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


ADVERTISEMENT

Not Plot Zero Values On Chart/Graph

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

Plot Multiple Series In 1 Graph/Chart

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

Plot On Chart/Graph As Zigzag Pattern

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

Interval Distribution Plot Chart/Graph From Selected Row

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

Macro: Plot Graph/Chart By Series Of Rows

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

Steps Graph - How To Plot

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

How To Plot No Values In Bar Graph

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

How To Plot Comparison Of Only 3 Points Against 9 In Graph

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

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 View Related

How To Plot Scatter Graph With Regression

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

Plot A Graph From One Single Cell

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

Do Not Plot Zeros In Graph With Macros

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

Updating Data Formula For Cumulative Log Plot Graph

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

Series Order In Legend, Multiple Chart Types

Aug 4, 2006

I 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?

View 9 Replies View Related

Area Chart To Display Price Spread Between Different Types Of Wheat

Feb 17, 2014

I am using an area chart to display the price spread between different types of wheat.

Now the problem I am having is that, at the "end" of the chart, ie. the most recent observation date, the line drops to zero while the value is actually well above zero. How can I avoid this ?

I am attaching a screenshot : Wheat Spread.PNG‎

View 3 Replies View Related

Chart Won't Plot Dates

Dec 6, 2006

I have some weekly data that I need to produce a graph from (100% Stacked Column). Each time I create the graph using the dates as the x axis i only get a thin line which looks like it represents one day, the other space looks like it is for the other 6 days of the week. I know that you could add an apostrophe to the beginning of the date but this is to be an automated report.

View 9 Replies View Related

Not Plot Blanks In Chart

Oct 8, 2007

I have a set of data which indicates readings taken at different dates/times at varying intervals.

I want to create a chart where time is the X-axis but the usual charting feature would spread the data points at regular intervals. I want the data is spread out across the X-axis according to the actual timings.

I have a sample data in the file attached to this posting. There I showed the type of chart I want to see (which I achieved only by modifying the original set, Table 1. The modified set of data is in Table 2)

how to achieve this with the original table of data, Table 1.

View 9 Replies View Related

Plot By Region Chart

Jan 1, 2008

I am trying to figure out the best way to plot this data -- For each region, I want to plot December 2006 snowfall against December 2007 snowfall. So starting on row 12 to row 41 (in the attached file). First challenge: the dates are not aligned because it is using the retail calendar where 12/3/2006 is compared against 12/2/2007. How can I plot the snow depth for the Northeast for example? I can't just use a dual axis chart because there are also dual dates...

View 3 Replies View Related

Excel 2003 :: Filter Data In Graph / Chart (without Having To Create New Chart)

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

Chart: Plot High And Low Data Only

Aug 12, 2008

I have a 46000 rows of data. I want to make a chart, but only want to plot the highest and lowest data points in the data set. How do I get Excel to automatically find and plot only the highest and lowest data points?

View 9 Replies View Related

Don't Plot Blank Cells In Bar Chart

Mar 17, 2006

I am trying to set up a bar chart that will not plot values where I have left the cell blank so that I don't have to keep resizing the source data / sorting the data whenever I add more data.

I have tried putting NA() as the value as you would for scatter plots
I have also tried leaving the category cell blank

Neither of these seem to work. I have attached an example.

View 9 Replies View Related

Chart/Plot Changing Range

Oct 24, 2006

I have a chart updating on a weekly basis

a) can i select a whole range without the chart picking up any blank cells or zeros, if so then a lot of my other question will be redundant

b) I only want to show 4 weeks at a time, so when a new column of data is added on, how do i get VBA to shift the range accross 1 to the right e.g.

week 36 37 38 39
Shift to
week 37 38 39 40

View 5 Replies View Related

Plot Chart From Selected Data

Nov 9, 2006

I have a large amount of data recorded from a logging device which i then need to convert to a graph. Is there some nice coding to enable the user to select a range of dates from column A and times from column B then allow the user to select the column in which relevant data is contained and plot a line graph of the data contained with named axes.

View 9 Replies View Related

Plot Columns With Chart Macro

Jul 11, 2007

I have 2 columns og data, for example

120
120
120
120
220
220
220
220
320
320
320
320
420
420
420
420

I want to plot them via a chart. But here is the problem..
My code.....................

View 3 Replies View Related

Plot Chart With Dynamic Range

Jun 27, 2008

I maintain data which gets updated every week. I have a chart associated with this data which I want to get updated automatically. I tried to use dynamic range on the chart and it kinda works. But the issue with my data is that I have data set in a row, followed by a blank cell which is then followed by average of last two weeks. Hence, when I use a dynamic range, it also displays the last value in the row (average), which I don't want to display in my chart.

So what I am looking forward to do is set up dynamic range or any other solution, which automatically updates my chart with weekly sales data without showing the average value in the chart. I have attached sample worksheet here.

View 4 Replies View Related

Plot Horizontal Line ALL Way Across Column Chart?

Apr 10, 2014

I have a data series plotted as columns. Then I want a horizontal line at $5,000 to appear all the way across the chart. It appears from the 1st to the last data point, but there is blank space before the first point and after the last point. I would like the red line to extend into this blank space before and after, so that it is going across the entire chart.

I tried playing around with different axis settings and no luck.

View 2 Replies View Related

Format Chart Plot Series/Axis

Jan 16, 2007

im having problem formatting my graph.

chart type = line.

I have 1 series of data, which is N values vs. Time.

Time however, is specified by specific dates. The graph is not putting a plot point accorrding to the date corresponding to the N value.

Example values:

date:____1/1/05 _______ 5/7/05 _____ 8/13/05
n value: __55 ___________ 22 _________ 11

I want the chart to reflect the time between the dates and put a plot point (n value) under each date listed and connect with a line.

View 9 Replies View Related

Not Plot Empty/Blank Cell In Chart

Aug 21, 2006

For Excel 2000:

In worksheet A, there is a column of numbers that can be 0 or not zero.

In worksheet B, there is a column of cells that determines if a corresponding cell in worksheet A is zero or not.


'As an example, for cell 'B!C6
=If( 'A!B52=0,"",'A!B52)

The column in worksheet B is used in a chart.

The chart settings are:
Tools | Options | Chart | Active Chart- Plot empty cells as: Not plotted

The chart is not treating "" as EMPTY, and therefore is not presenting correctly.

How would I set the value of cell 'B!C6 to EMPTY (or null, or blank, or whatever Excel calls it) using an IF statement, such that 'B!C6 would evaluate to EMPTY, and be ignored by the chart?

Would this be any different in Excel 2003?

View 9 Replies View Related

Incorrect Plot Order: Area Chart

Oct 26, 2006

I have plenty of experience with VBA outside of charts so that's where I need assistance. I need to get SeriesCollection(4), the PTAI series, to appear on the area chart second from the bottom instead of on the top.

The order for the non-line series should be, from top to bottom:
SeriesCollection(3) - Non-Mission AC ( Training, T&E, AMarc series)
SeriesCollection(2) - Total Pipeline series
SeriesCollection(4) - PTAI series
SeriesCollection(1) - Available PMAI series

Here's the

Sub MakeSandChart()

Dim ChartSource As Range
Dim ChartName As String
Dim ChartSheet As String
Dim yCount As Integer
Dim PAA_Value As Integer

Application. ScreenUpdating = False

passtype = Mid(ActiveSheet.Name, 5, 1)
Set ws = Worksheets(ActiveSheet.Name)

ChartName = Left(ActiveSheet.Name, 5)
ChartSheet = ChartName & " Chart"
ChartName = "F18" & passtype
Set ChartSource = Union(Range("SummRowDate" & passtype), _
Range("SummRowTAI" & passtype), _
Range("SummRowNM" & passtype), _
Range("SummRowTotPipe" & passtype), _
Range("SummRowPTAI" & passtype), _
Range("SummRowPMAI" & passtype), _
Range("SummRowPlanPAA" & passtype), _
Range("SummRowWorkPAA" & passtype), _
Range("SummRowDrillPAA" & passtype), _
Range("SummRowBaseline" & passtype))

Worksheets(ChartSheet).Activate

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved