Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations pierreick on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending/Receiving Data From Excel

Status
Not open for further replies.

reichertc

Mechanical
Mar 21, 2001
115
OK. Here is the situation. I have a very complex Excel spreadsheet. I want to vary two of my inputs, and check what happens to a single output. I want to do this thousands of times so that I can analyze some trends.

I thought what I would do is create an Excel component within Mathcad, enter a range as the input, and get a range as an output. I cannot make this work. Is this possible?

For example, take an Excel spreadsheet as follows:

Cell A1: [input 1]
Cell A2: [input 2]
Cell A3: =A1*A2 [output]

Now in Mathcad, I want to create the component with the inputs and outputs as lissted above and then feed inputs like:

[input 1] A:=1,2..10
[input 2] B:=4

I would like the output to be in such a form that I can graph the input on the x axis and the output on the y axis of a line graph.

Any ideas?
 
Replies continue below

Recommended for you

The linkage between components is rather slow; you're probably better off writing a macro in VBA to iterate through your worksheet and then either plot in Excel or copy the results to Mathcad.



You could try posting this on the Mathcad forum:


TTFN
 
I just had the same situation and determined that you can't do this in Mathcad. If you try to input a range of variables in the excel sheet, mathcad inputs them into excel as an array furthermore, you can't insert a component in a Mathcad program loop. I ended up using the scenario function of excel. It does just what I think you want to do and it is all within excel so it is pretty fast. The only drawback is that is does not automatically update, so if you change something in your sheet, you have to rerun the scenario to get a new summary.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor