Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Basic excel parametric sweep 3

Status
Not open for further replies.

dkastz

Mechanical
Aug 19, 2011
13
Hello colleagues

I have a range of cells with input data. For each of it i want to put corresponding value into a calculations sheet and store the result into new range - how to do that with VBA ?

thanx and kind regards
 
Replies continue below

Recommended for you

If your target range and source range are the same shape and size you could use named ranges:

Sub CopyData()
Range("TargetRangeName").Value = Range("SourceRangeName").Value
End Sub

If you want to do something more complicated, can you provide more details.

Doug Jenkins
Interactive Design Services
 
...its like i have a sheet with complicated calculations of an angle. i want to have 100 increment input and see (and store)the result position...
 
What happen in vagueness, stays in vagueness.

You haven't helped yourself with your statements. Can you upload your workbook or at least post an example that illustrates your problem?

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
The OP's requirements are a bit vague, but on my reading of them I fully agree with MintJulep that the TABLE feature in Excel is exactly what is required.[ ] Several years ago I was asked by my employers to give a series of lunchtime talks on some of Excel's powerful but lesser-known features, and this was one of them.[ ] I attach the example I used as part of my talk.
 
 http://files.engineering.com/getfile.aspx?folder=ce87dc3a-9b13-4919-92f0-15e9c53f23b2&file=Table_Demo.xls
Thank you Denial. Thanks to your post I have finally found where the Goal Seek function has been moved to in the new "Office" bar system. I still use the old keyboard shortcut of Alt + t then g. Haha, I've been doing this since Excel 2007 came out, and now I finally know.
 
And thankyou TomBarsh for the shortcut :). For some reason I've always gone via the Data tab, which is annoying when you want something on the Home tab.

I agree that the Data Table feature is probably the easiest option, but another way to go if you are happy with VBA is to create a User Defined Function which is entered as an array formula. That can then return an array of any required size.

As Skip said, an example workbook showing what you have so far would be helpful.

Doug Jenkins
Interactive Design Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor