#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default X, Y Graph

Hi,
Is there a way to automatically plot an x,y graph in which
x will be varied from n to m in k steps?

The y value is calculated in the same spreadsheet using multiple formulas
throughout the spreadsheet (So it is not a single formula in a single cell).

Michael


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default X, Y Graph

Michael,

An easy way is to use a macro to vary X and record both X and Y in a table. It is easier in Excel 2000 or higher, since you can
force a calculation a little better.

For example, if you enter X into Cell A1, and all the intermediate formulas result in the final value in cell A10, with nothing in
either columns B or C (which is where I will put the resulting table) the sub below will generate the table, which you can then use
to create your graph. You can make the graph generation into a macro as well.

HTH,
Bernie
Excel MVP

Sub TryNow()
Dim X As Double
Dim N As Double
Dim M As Double
Dim K As Integer

N = 1
M = 10
'Enter the number of values you want, rather than steps
K = 6

For X = N To M Step (M - N) / (K - 1)
Range("A1").Value = X
Application.CalculateFull
Range("B65536").End(xlUp)(2).Value = X
Range("C65536").End(xlUp)(2).Value = Range("A10").Value
Next

End Sub




"Noone" wrote in message ...
Hi,
Is there a way to automatically plot an x,y graph in which
x will be varied from n to m in k steps?

The y value is calculated in the same spreadsheet using multiple formulas
throughout the spreadsheet (So it is not a single formula in a single cell).

Michael




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I graph data daily as a line graph across a calendar format Glani Charts and Charting in Excel 3 November 23rd 07 09:05 AM
How do I plot multiple series on one graph? - test-graph.xls (1/1) Leo Bueno Charts and Charting in Excel 0 August 2nd 07 12:14 AM
Creating a graph similar to a stacked column graph Jonathan Charts and Charting in Excel 6 August 4th 06 04:23 PM
Powerpoint Graph- Shading in between two linear graph lines TerenYoung Charts and Charting in Excel 1 June 15th 06 09:29 AM
Hyperlinkage of one graph with another graph or Drill down graph Sanjay Kumar Singh Charts and Charting in Excel 1 January 3rd 06 12:22 PM


All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"