×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Increment a Variable Value Display Results of Each Iteration - Macro help needed

Increment a Variable Value Display Results of Each Iteration - Macro help needed

Increment a Variable Value Display Results of Each Iteration - Macro help needed

(OP)
I've attached a spreadsheet that I need some help with. I am in the beginning stages of learning C++ and will eventually get to VBA but I'm not there yet. I think I could actually generate the 'for' loop and then out putting the results in C++ but I don't know VBA very well :(.

Essentially what I need is to increment a value (failure angle) and output the associated result (active force). Each of these to display in a column. I will take it from there i.e next find max results make graphs, etc.

The spreadsheet has comments of what I'm looking to accomplish. Let me know if you have any questions.

Thanks I appreciate your help!!

EIT
www.HowToEngineer.com

RE: Increment a Variable Value Display Results of Each Iteration - Macro help needed

You could look at using a data table to do what you want. It looks like MS don't like to talk about data tables all that much any more, but they do have an article here: http://office.microsoft.com/en-au/excel-help/calcu...
Look under "what-if analysis" on the data tab.

Alternatively if you'd like to have a go at VBA, it's pretty easy to do what you want. In fact I've set up a macro to do it (took about 15 minutes).

I really don't see any benefit in doing it in C++. Almost all the work is in transferring data from the spreadsheet and back, and you'll need to know the VBA object model to do that anyway.

To run the macro in the attached file press Alt-F8 and select Active_Force. To see the code press Alt-F11. To step through the code press F8 when in the VB Editor window.

I have changed the file extension to xlsb so it will store the macro. You can also use .xlsm if you want.

Any questions, please ask.

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/

RE: Increment a Variable Value Display Results of Each Iteration - Macro help needed

(OP)
Doug,

Wow, thank you! For some reason I did not receive or missed the email alert. I actually have modified the spreadsheet since and even created another one where I need the same process. I will look this over and try to understand what's going on here as I seem to need this type of routine quite often.
When I was referring to C++ if simply meant the syntax of C++. Thank you for the help, it's greatly appreciated.

EIT
www.HowToEngineer.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources