VBA Changing Y-Axis Graph?
Apr 8, 2012I am able to change the X-Axis with:
Code:
ActiveChart.Axes(xlCategory).TicketLables.Orientation = 45
How I change the Y-Axis?
I am able to change the X-Axis with:
Code:
ActiveChart.Axes(xlCategory).TicketLables.Orientation = 45
How I change the Y-Axis?
Two questions:
1) How do make values on x-axis as words? E.g. apples, oranges, etc.
2) Is it possible to have the numbers on x-axis in descending order? If I can figure out 1), I can do this as well, but it would be nice to know if it is possible to have the numbers on x-axis in descending order.
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.
how do you create a graph with a field such as vendors on the X-axis, but with dollar values spent on the left side of the y-axis and percentage of total dollars spent on the right side vertical axis?
View 3 Replies View RelatedI am trying to add a secondary axis for a graph but it is not displaying as it normally does, instead of the columns remaining side by side they overlap. I don't normally have any issue with this so I'm not sure what I'm doing wrong. I've attached images to show what i mean.
Before I add secondary axis
After adding secondary axis
how can i make a graph "like a line graph"
to have multiple value axis's?
There is probably a really simple solution to this, but I have a column 'A' of data, with various numbers, and a column of data 'B' with letters from A to Z. However when I try and plot this on a scatter graph, the x axis uses numbers rather than letters, with data points all over the place?? I'd like the X axis to have the letters A to Z, and the data to stack up vertically when there is a few different numbers correpdoing to 1 letter. Specifically, a scatter graph
View 3 Replies View RelatedOn my graph the bottem axis shows 1-30, I'd like to change this to 30-1 as I track change over the last 30 days. I tried selecting reverse axis but it reverse's the data as well. Is it possible to change the axis text only, eg latest entry will be one and the 30 day old data will be 30.
View 2 Replies View RelatedHey guys, been searching around for a while now, yet to find an answer to this.
I have 3 columns of data ......
I have a line graph that contains information for the following products,
Boats , Cars & Bikes.
The chart works well but i would like to show the numbered scale of each product & i can't work out if this is possible in excel.
Currently i can only get two data showing for the axis.
I would like to show all three & just use a color to indicate which data corresponds to which product.
In my attached example: I have data for both Cars (blue) & Bikes (green) but i would like to also show data for the graph scaling for Boats (pink).
I would like to graph the data shown below using a scatter graph. However, when I use the cart wizard it assigns numerical values to each data point and then plots the data accordingly. How can I get the scatter graph to group the assets with the same ratings together? Note, I don't want to have to assign values to assets with the same rating each time. I have attached the spreadsheet so you an see the problem.
View 5 Replies View RelatedI have a set of data which I need to plot both unordered and ranked.
For the unordered (as is) data, a line graph is fine, as it gives the category labels along the x axis.
For the ordered data, i have a row with the ranking in, and then plot an xy scatter graph, so the values increase.
This obviously has the rank numbers along the x axis, not the corresponding category labels.
Is there anyway to force this? I know there are chart labelling add-ins on here, but our IT dept blocks the download.
The attched file is a very small example.
I'm simply trying to graph my data on a line graph in Excel. see the attached.
The issue is that the spacing on the x-axis is all equivalent. I want the space between the initial and 1st month to be very small while the space between 6 month and 12 month be larger.
So at the end of the day, the line will be kind of crunched down from the beginning and goes up at the 6 month data point.
Is Excel capable of handling such simple request?
Is there a way to show the Vertical axis on both right and left side of the graph or at least on the Right hand side?
View 5 Replies View RelatedI need to sort a horizontal bar graph, with the Y Axis in alphabetical order.
View 6 Replies View RelatedI have a pivot chart which has one Axis field (Cell Ref2) and one Sum of Values field (which is a table series of percentages calculated from formulas)
I see the graph like I'd expect, but I'm struggling to get it to show percentages rather than basic integer units on the y-axis? Usually I would imagine to just right click on the y-axis : Format Axis, and expect to see something to change the display units, but it is only for hundredths thousands etc rather than a percentage ? The units themselves in the table for that value series are in percentages so I don't see why it isnt showing the percentage units in the first place.
If I have data that shows one year back information, how do I get my chart to have the last date showing up on the axis (the date label) to always be the most current date?
View 4 Replies View RelatedI'm trying to make a line graph with specific increments on both the x and y axis. Now, I can make specific increments on one, but have to sacrifice the other in order for me to label the lines. Im not sure how to get around this. I'll just type out what i'm trying to do and maybe you smart people can help me here.
Okay, both the x and y axis must be in increments of 8,10,12.5,16,20,25,30, and 35.
The first line should be labeled "Indicated magnification, and should have the values 8,10,12.5,16,20,25,30, and 35... the same as the x and y values, making the line a straight linear line.
The second line should say "actual m value" and have values of 10,12.5,15.5,20.5,25,31,37.5, and 44.
The third line should say "actual n value" and have values of 10,13,16,21,26,32,38.5, and 45.
I have been given a task to create a line graph who has 10 categories and each category has 5 different values. I need to plot a line graph, so that those 10 categories should appear on the Y-axis instead of X-axis.
I am using Excel 2010.
I have modified the Run as Regular Macro code from this site to only changing the x axis, select different cells and I also only used object 1 instead of the name of the chart.
The problem is that when it is run which ever value is changed last, minimum or maximum, it will turn on auto and mess it all up.
I've been successful at changing the font size for the Main title and legend using these commands:
Code:
ActiveChart.ChartTitle.Font.Size = 8
ActiveChart.Legend.Font.Size = 8
But the horizontal axis has me stumped. I recorded part of this but can't get it to work:
Code:
ActiveChart.Axes(xlValue).AxisTitle.Font.Size = 8
How can I change the typeface to Times New Roman for all three and change the font size for the Axis titles? hundreds of charts to change and not enough patience to to it manually.
I'm trying to change the default option for the data series when graphing in Excel 2003 .... I am trying to create a line graph
Excel, by default, is putting static pressure on the x axis and the air flow on the y axis .... I need it to be the other way around
I have found out that:
By default, Excel plots whatever you have fewer of—rows or columns—as the data series
apparently it is possible to change this Excel default option, but I can't figure that out
in step 2 of the Chart Wizard, I have tried many different things, but can't get Excel to chart the Air Flow CFM on the x axis, and have static pressure values on the y axis
I have some code for changing the scale of my chart axes so that when new data is inserted into the column which the chart sources from (say column B), the axis scales on my chart will automatically adjust (as the Excel algorithm sometimes leads to charts which are a bit squashed). This code works fine, and I have included it below.
I have then tried to introduce an ActiveX listbox so that when you select an item in the box, the reference number generated (1,2,3...etc) then determines which data series is inserted into column B using a vlookup function. However, when I do this, the original VBA code for automatically adjusting the chart axes no longer works.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet.ChartObjects(1).Chart
[Code].....
I would like to change the color of my text on my X-axis of a graph. I would like to have 4 or 5 different colors to identify different categories. I see how I can change all the text but how would I change just the text in column 1-3 to red, column 4-7 to blue, etc...
View 2 Replies View RelatedI have a normal line graph I would like to see plotted vertically rather than the normal horizontal layout. In other words, points/lines would appear around a vertical axis and go from side to side. The normal graph would look as if it was tipped on its left side.
I am trying to automate a graph for data that is not always the same amount but always in the same format. I have attached a spreadsheet that has an example of the data.
Columns B, D, & E are the ones that I am interested in charting in a line with markers type graph, but the rows may be 100 for one set of data and 1000 rows for another set of data. I am trying to get the macro to open a new worksheet and as part of the macro create a userform that will ask for the text information on the top of the worksheet (as this is not always correct when imported).
I have hundreds of column graphs, how do I quickly change the size of them to the exact same size of 8.1cm height and 26.4cm width.
View 1 Replies View RelatedI 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.
I have a vast database where I have linked charts. I send the data from a macro to the database and sometimes there are 1000 inputs and sometimes there are only 20.
How would i set up my charts to only graph the inputs that are present?
I work with a team of users that are continually publishing reports in Word that contain charts and graphs copy and pasted from Excel into Word 2010.
We have a custom script that leverages a PDF engine to automatically convert .doc files to .PDF files that we distribute electronically to our clients. This all works great, but only if all my users select 'paste special' and Enhanced Metafile Format when adding their excel charts into our reports. Most of these people aren't tech savvy, and I'm havin ga hell of a time getting them to follow this workflow and am hoping there's a way in Office 2010 to select the default paste from excel into word when the content is a chart.
It seems like the default paste from excel is an embedded chart/graph that you can then further manipulate each component of the chart in Word; the default doesnt' paste an actual image. I am assuming the pdf renderer is using a lower resolution .PNG version of the image and when these are scaled for print and or pdf, they look like crap.
Is htere anyway I can automatically change the default paste format for the chart from excel into word to be an EMF/EMV (enhanced metafile?) Either thorugh the registry or some other saveable setting?