Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help for getting output | Excel Discussion (Misc queries) | |||
output to txt by COL. | Excel Programming | |||
Output to CSV | Excel Programming | |||
Getting output from an excel output back to cscript.. | Excel Programming | |||
Too much output... PLEASE HELP! | Excel Programming |