Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Set of varibles produces one output. Need series of output.

Aaron,

Yes, it is possible. You could use a macro to change the values in a cell or multiple cells, then
calculate your model, and record the results of any calculation as a value in a table. You would
need to better define your problem, but it could be as simple as the macro below, which varies the
values in cells A1 and B1, then records the output of cell H2, creating a table that starts in
A6:C6.

Sub TryNow()
Dim i As Integer
Dim j As Integer
Dim myRow As Long

Range("A6").Value = "I Value"
Range("B6").Value = "J Value"
Range("C6").Value = "Calc'd Value"
Range("A7:C65536").Clear

For i = 1 To 10
For j = 1 To 10
Range("A1").Value = i
Range("B1").Value = j
Application.CalculateFull
myRow = Range("A65536").End(xlUp)(2).Row
Cells(myRow, 1).Value = i
Cells(myRow, 2).Value = j
Cells(myRow, 3).Value = Range("H2").Value
Next j
Next i

End Sub

HTH,
Bernie
MS Excel MVP


"Aaron" wrote in message
...
I have what seems to me to be a large and complex multiple sheet wookbook
that uses & produces multiple sets of calculated tables all to produce one
final set of data and one key number all based on a set of about 20 input
variables. Is it possibe to produce a series of results in the key number
based on set of values for one particular variable instantly without having
to enter the series of variables and manually record the result of the key
data? 'Cause if it is that would like totally rock! Seriously it would be
great and I would appreciate the help.

Or with 2 or 3 variables.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Set of varibles produces one output. Need series of output.

That looks really good. I will try it and let you know how it goes. Thank You!

One question, this is probably really basic but I am skill level at VBA
would best be described as novice self taught, the Data input sheet is
separate from the output sheet, how do I identify the correct cells when they
are in another sheet in VBA?

"Bernie Deitrick" wrote:

Aaron,

Yes, it is possible. You could use a macro to change the values in a cell or multiple cells, then
calculate your model, and record the results of any calculation as a value in a table. You would
need to better define your problem, but it could be as simple as the macro below, which varies the
values in cells A1 and B1, then records the output of cell H2, creating a table that starts in
A6:C6.

Sub TryNow()
Dim i As Integer
Dim j As Integer
Dim myRow As Long

Range("A6").Value = "I Value"
Range("B6").Value = "J Value"
Range("C6").Value = "Calc'd Value"
Range("A7:C65536").Clear

For i = 1 To 10
For j = 1 To 10
Range("A1").Value = i
Range("B1").Value = j
Application.CalculateFull
myRow = Range("A65536").End(xlUp)(2).Row
Cells(myRow, 1).Value = i
Cells(myRow, 2).Value = j
Cells(myRow, 3).Value = Range("H2").Value
Next j
Next i

End Sub

HTH,
Bernie
MS Excel MVP


"Aaron" wrote in message
...
I have what seems to me to be a large and complex multiple sheet wookbook
that uses & produces multiple sets of calculated tables all to produce one
final set of data and one key number all based on a set of about 20 input
variables. Is it possibe to produce a series of results in the key number
based on set of values for one particular variable instantly without having
to enter the series of variables and manually record the result of the key
data? 'Cause if it is that would like totally rock! Seriously it would be
great and I would appreciate the help.

Or with 2 or 3 variables.




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
Need help for getting output balurrpr Excel Discussion (Misc queries) 2 April 15th 10 10:12 AM
output to txt by COL. Jack Excel Programming 0 November 17th 05 06:33 PM
Output to CSV sanjay Excel Programming 1 February 8th 04 07:28 PM
Getting output from an excel output back to cscript.. J S Excel Programming 0 January 21st 04 09:06 PM
Too much output... PLEASE HELP! Mark Rosenkrantz Excel Programming 4 August 7th 03 03:58 AM


All times are GMT +1. The time now is 08:17 PM.

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

About Us

"It's about Microsoft Excel"