Controlling excel chart axis

Hi, 

     I have automated plotting of charts of date v/s speed recorded on a 
particular day with date on the x-axis and speed on the y-axis for each car 
that is being tested say Focus, Escort and Ikon. The graph gets displayed 
properly for the first data selected
(say Focus) from a combo box. Now, for the other selection, the graph axis 
are getting reversed i.e date is getting plotted on the y-axis and speed on 
the x-axis ! 

Is there some why to control this ? 
I’m using Excel with VBA. 

TIA 


0
Rain (17)
1/16/2005 8:45:03 PM
excel.charting 18370 articles. 0 followers. Follow

1 Replies
692 Views

Similar Articles

[PageSpeed] 58

Is it still the same type of chart? You must somehow be mixing up Values and XValues 
for the additional series you are adding. Make sure also that you consistently have 
the X values to the left of the Y values in the worksheet.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Rain wrote:

> Hi, 
> 
>      I have automated plotting of charts of date v/s speed recorded on a 
> particular day with date on the x-axis and speed on the y-axis for each car 
> that is being tested say Focus, Escort and Ikon. The graph gets displayed 
> properly for the first data selected
> (say Focus) from a combo box. Now, for the other selection, the graph axis 
> are getting reversed i.e date is getting plotted on the y-axis and speed on 
> the x-axis ! 
> 
> Is there some why to control this ? 
> I’m using Excel with VBA. 
> 
> TIA 
> 
> 

0
1/20/2005 1:15:05 AM
Reply:

Similar Artilces:

i can't figure out how to calculate percentages in excel
hI I can't seem to get excel to show my the right numbers in percent format i'm dividing a cell of 3000 by a cell of 342 and i get 8.771929825. if i try to switch this to percentages i get 877%. what am i doing wrong? Nothing. 8.77 *IS* 877%, just as 1.00 is the same as 100%. What are you expecting? In article <63010FFE-C18F-41B7-A652-0F512F575D95@microsoft.com>, Laserbeak43 <Laserbeak43@discussions.microsoft.com> wrote: > hI > I can't seem to get excel to show my the right numbers in percent format > i'm dividing a cell of 3000 by a cell of 342 a...

mail merge from excel?
How do I merge lists onto letters? Take a look here: http://support.microsoft.com/default.aspx?scid=kb;en-us;212314 In article <A2126B11-6212-4553-840C-2156A6B3B539@microsoft.com>, bswope <bswope@discussions.microsoft.com> wrote: > How do I merge lists onto letters? ...

Excel 2003 Array Formula in Excel 2007
Hello all, I am moving from Excel 2003 to Excel 2007. One problem I'm having is with the following array formula which works in 2003 but returns a #VALUE! in 2007. Is there something I need to change in my 2007 setup to make this work? {=(SUM(IF(LEN($H$7:$H$476)<>0,1,0))-1)-(SUM(IF(LEN($K$7:$K $476)<>0,1,0))-1)} .... I know there are probably more efficient ways of doing this so I'm not looking for better solutions. I'm wondering ... why won't it work? There are 3 array formulas on the spreadsheet and all are returning #VALUE! Thanks in advance! Ben Cacace On ...

Excel 2002 Issue
When I have Excel open and I receive an email with an Excel attachment in it, I can't open the email without closing Excel and reopening it. I've tried repairing my installation, but that doesn't help. Any suggestions? Try right ckick on the attachment>save -- Don Guillett SalesAid Software donaldb@281.com "shawn" <Shawnp_29@hotmail.com> wrote in message news:u7Q85QP4DHA.2804@TK2MSFTNGP11.phx.gbl... > When I have Excel open and I receive an email with an Excel attachment in > it, I can't open the email without closing Excel and reopening it. I&...

error bars on bar chart in Excel 2007
I would like to assign a separate error bar value to each of the data sets within my bar chart. When I use the customise error bars feature it allocates the same error bar to all of the bars in the graph. Each chart in the bar is a mean in itself, hence the requirement for individual error bars. I see from previous posts that this appeared to be possible in Excel 2003 but I don't have access to this version. If each bar represents the average of a set of numbers, then you can calculate the standard deviation (or other measure of dispersion) for this set of numbers. Put these ca...

Opening excel from launch bar opens 2 existing files, not blank on
Opening excel from launch bar opens 2 existing files, not blank one - does anyone have any idea why? I checked the setting under Tools > Options > General > at startup open all files in: and there is no entry. Thanks! Look to see if those files may have gotten saved in the XLSTART folder. HTH -- Sincerely, Michael Colvin "laralea" wrote: > Opening excel from launch bar opens 2 existing files, not blank one - does > anyone have any idea why? I checked the setting under Tools > Options > > General > at startup open all files in: and there is no ent...

How to chart a series of formulas?
Hi, does anyone know how to chart a series of formulas? I currently chart cells in column C. Each cell in column C contains a formula - "=A1+B1", "=A2+B2", "=A3+B3", etc. I would like to do away with column C and just get the chart to calculate the values that are being displayed automatically. How can you do this? Thanks Marcus - Charts aren't that smart, and worksheet ranges are pretty cheap. Compute the data in the worksheet, and plot the column with the formulas. Of course, you could name your ranges (Adata and Bdata) by selecting each range, ty...

Excel function to do this?
Hi, Say I have this: A B 1 1 1 2 3 5 2 7 4 11.....and so on How can I produce column B (e.g., B5=A5+B1+B2+B3+B4)? Thanks, Mike In article <5ff86e7e-4215-4fde-85d4-9fe110a658e2 @l24g2000vby.googlegroups.com>, mas_it_2000@yahoo.com says... > > Hi, > Say I have this: > > > A B > 1 1 > 1 2 > 3 5 > 2 7 > 4 11.....and so on > > > How can I produce column B (e.g., B5=A5+B1+B2+B3+B4)? Type =SUM(A$1:A1) in cell B1, and then drag the formula down as far as you need. Dollar signs in formulae force absolu...

How do I specify x-axis data for a logarithmic line graph?
I have a 2 sets of data that I want to graph in a logarithmic line graph where the y-axis is logaritmic and the x-axis is arithmetic. I essentially have coordinates (x,y) that I want to plot, but excel automatically graphs my selected coordinates as two series' of range values, and they take the corresponding spreadsheet row number as the x-axis values. You have made a Line chart when an XY chart was needed. A very common mistake caused by the odd name "line chart" best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "kculerie" <...

VBA and Charting Named Ranges?
Our developers write out a .csv file, with row 1 being the strings for the column titles. I can read these .csv files into a worksheet, so that column 1, for example is titled "LogTime", and Column 10 is TimeOnDisk. I can create a named range for each that covers just the cells that are populated e.g.($A$2:$A$2280). I can use the Names drop-down to verify the named ranges are correct. I have to do this, because in the next release, the developers may add or delete columns of data, but have promised to keep the column names. And the number of rows varies by the number of days worth of...

Run time error adding controls to form programatically
Hi, I've got some VBA that programatically adds additional optionbox controls to a userform (call this FRM_CHOOSE). The addition is actually driven by another userform (call this FRM_UPDATE) which up til now only contained optionbutton and commandbutton controls and everything has been working fine. I've now added a combobox to FRM_UPDATE however now when the script gets to the point of adding the new optionbox control to the other form it errors out with "Run-time error '-2147319767 (80028029)': Invalid forward reference, or reference to uncompiled ...

how do i extract the formula from a trendline in Excel?
I have a lot of data with an order 6 polynomial trendline. I know I can see the equation used to plot the trendline by displaying the equation on the chart, but is there a way to output this equation to a cell instead? I would like to analyse the data, but copying each equation for each set of data into cells (and having to rewrite them as formulae that excel will recognise) will take a long time. Thanks. If it's a poly fit, use the LINEST worksheet function: http://www.stfx.ca/people/bliengme/ExcelTips/Polynomial.htm If it's more complex, try Tushar's approach: www.tushar...

Help Programming an XY scatter Chart #2
I have a user form that inputs data onto a spreadsheet. I have a command button that runs a macro that activates the sheet, selects the data, and creates the XY Scatter chart. My Problem is that I don't know how to set a loop to set each series' properties . (The number of series changes every time) Bellow is an example where I manually set the properties for three of the series. Any Ideas on how to create a loop to set all. Range("A:A,C:C,D:D").Select Range("D1").Activate Charts.Add ActiveChart.ChartType = xlXYScatter ActiveChart.SetSourceData Sour...

Control P
Why can't we get the Control P to work for printing. The Control Q in SOP works great but we can't bet the Control P to work in any of the modules. Thanks Cheryl Cheryl, Control P seems to work just fine on my GP 9.0. I just tried it on a few random screens, including Sales Transaction Entry. What version of GP are you running? -- Victoria Yudin Dynamics GP MVP Flexible Solutions - home of GP Reports http://www.flex-solutions.com/gpreports.html "Cuddles" <Cuddles@discussions.microsoft.com> wrote in message news:A68F7F70-5CE3-4445-B05A-B4418A1DF6C9@microsoft...

PowerPoint 2007 Org Chart
Do you have any training on how to do an org chart in 2007 PowerPoint? The online training is inadequate in reference to org charts. Loved 2003 but so far hate 2007. -- Sunsen Hi I found quite a lot of info on the MS website - but you may not have found it as they have sneakily renamed org charts. They are now part of SmartArt... There is a training course here: http://office.microsoft.com/training/training.aspx?AssetID=RC101772971033 And SmartArt related stuff here: http://office.microsoft.com/en-us/powerpoint/CH100675761033.aspx If you have a particular question, l...

Multiple Colors on Area Charts
I would like to know if it is possible to have two different colors in the plotted area of an area chart. In the end, I would like to have the color for numbers less than 0 be one color and greater than 0 be second color. Thanks Hi Have a look at Jon's page on horizontal bands. http://peltiertech.com/Excel/ChartsHowTo/HorizBands.html Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "SarahR." <SarahR.@discussions.microsoft.com> wrote in message news:A77861A3-B9B7-4926-BA1F-9FBE14BE03B4@microsoft.com... >I would like to know if it is pos...

how to create a line-chart with 2 sets of data who has different x
hi, i don't know how to create a line-chart with 2 sets of data, they have different size. Say set_1 has x-axe from 0 - 12 with 150 intervals. Set_2 has x-axe from 0-14 with 130 intervals. How to put them into a single line chart? Make an XY chart instead. You can connect the markers with lines in both types of charts. http://peltiertech.com/WordPress/2008/07/10/line-charts-vs-xy-charts/ - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Frank_C" <Frank_C@discussions.microsoft...

Excel Macros #8
Is there a keystroke combination that will disable further macros from running on a loaded spreadsheet? If, fo example, I allowed macros to execute when the spreadhseet originally loaded, how do I disable this function while inside the same spreadsheet? Hi Joe One way If you add this line in each macro/event then the macro will not work when cell A1 have the value "stop" you can run a macro with this line to place the word "stop" in the cell Sheets("Sheet1").Range("A1").Value = "stop" Sub test() If Sheets("Sheet1").Range(&quo...

excel crashes when changing web query
Hi, In excel 2003, i have a file that pulls in data via Data / Import External Data / New Web Query. I've been using the file for about 3 years, and now when I try to edit the query to pull in the latest table on the same website, excel crashes. And it does the same on another pc running excel 2003. However, I can successfully import data using the same method from other websites. (When I'm editing the query, I can the IE Script error, but not sure if that's related.) I would be grateful for any suggestions. Thanks, Graeme ...

Required fields in Excel
I'm brand new to using VB. I have been playing around with setting up required fields in Excel. I was lucky to find a post with the following code: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Worksheets("Sheet1").Range("A2").Value = "" Then Cancel = True MsgBox "Please Fill-In A2" End If End Sub I have tested this and it works fine. This basically ensures that excel can't be saved unless the specified cells are filled in. Now for a really stupid question. How do I save this script to the excel workbook so ...

accessing excel in another thread
Hi, I am using this to send data to excel, it works ok, but when I try to use it in another thread it fails. if(!app.CreateDispatch("Excel.Application")) { AfxMessageBox("Couldn't start Excel and get Application object."); return 1; } Does CreateDispatch works only in the mai nthread of the program ? thanks, Behzad ...

how do i generate invoice from excel datafile?
how do i generate invoice from excel datafile? -- jm mailmerge in word "jm" wrote: > how do i generate invoice from excel datafile? > -- > jm ...

Creating an age or service spread chart
I have an XL2003 spreadsheet containing employee names, departments and dates of birth. I would like to set up charts showing (a) how many people are in each department and (b) how many people are of each age. -- Dave B You could set up a separate table to get the info. List the departments and use an indirect sumproduct formula such as =SUMPRODUCT((ChecksB=B10)*1) or =SUMPRODUCT((ChecksB=B10)*ChecksD) -- Don Guillett SalesAid Software dguillett1@austin.rr.com "Dave Bradshaw" <DaveBradshaw@discussions.microsoft.com> wrote in message news:A90CCA2A-DFEE-449A-9316-E0049...

Graph lines formatting in Excel 2007
I appear to have a couple of problems in Excel 2007 SP1 i) Although the help says you can reformat multiple lines by using the Ctrl button and the mouse, it doesn't seem to work .. I highlight the first line and when I try the second it deselects the first . Any ideas ii) I'm using Excel to display sets of spectra .... the default line thickness is 2.25pt and I want to set the default to 0.25 pt, how do I do it ?? iii) I resized a graph of 160 lines by hand (yawn, yawn) and saved it as a template ... however when I draw a new graph from the 160 lines and apply the temp...

Chart size relative to contents
2 questions: 1.) I have a chart which plots circles in an X Y scatter. Based on the size of the circles within the chart, the circles appear as an ellipse. I can resize the chart manually to bring the circles back to shape - I was wondering if there was some quick VBA to make the chart area relative to the X and Y axis length. 2.) I use these charts as a template, so the data changes. If I know the extreme X and Y values, is there a method to control the axis length with that information - while still taking advantage of the "automatic" scaling feature? (this will be i...