Creating a table of results
Creating a table of results
(OP)
I have a series of input variables and several formulas leading to a final formula with the desired result.
What is the easiest way to make a table using a single input variable and the final resulting value? I thought about lining up all of the input and the equations in a single row, copying the row down and then hiding all of the columns except two. I also thought about copying and pasting the values one at a time into a table. Too much work!
Any ideas?
What is the easiest way to make a table using a single input variable and the final resulting value? I thought about lining up all of the input and the equations in a single row, copying the row down and then hiding all of the columns except two. I also thought about copying and pasting the values one at a time into a table. Too much work!
Any ideas?





RE: Creating a table of results
CODE
Dim w As Worksheet
Dim InputCell As Range, ResultCell As Range
Dim i As Integer
Set w = Worksheets("Sheet1")
Set InputCell = w.Range("A1")
Set ResultCell = w.Range("C1")
For i = 10 To 15
InputCell.Value = w.Cells(i, 1).Value
w.Calculate 'not required if calculation is automatic
w.Cells(i, 2).Value = ResultCell.Value
Next i
End Sub
Cheers,
Joerd
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: Creating a table of results
I have never tried VB before. I put a list of input values in the range A1-A20 on Sheet2 and I want the VB to put the results in B1-B20 on Sheet2. My input cell is B10 on Sheet1 and my result formula cell is B16 on Sheet1. I don't have a clue???
RE: Creating a table of results
RE: Creating a table of results
I already tried using The Scenario manager and I don't think it applies.
RE: Creating a table of results
How about using SQL -- ORACLE / MS Access?
Thanks,
G. Feric, PE
http://engware.i-dentity.com
RE: Creating a table of results
RE: Creating a table of results
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Creating a table of results
I would like to understand how to use the VB code that Joerd posted for next time. It looks simple. However, I have never tried using VB before. Maybe you can teach an old dog new tricks.
Anyone?
RE: Creating a table of results
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Creating a table of results
The Web-based help for Data Tables in the latest version of Excel is pretty useless. The following is from an earlier version:
RE: Creating a table of results
RE: Creating a table of results
I've just been playing with it, it's pretty cool.
Take a few minutes to play around with it.
RE: Creating a table of results
The Data Table is exactly what I needed!
RE: Creating a table of results
Cheers,
Joerd
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: Creating a table of results
The Data Table can be created anywhere in the worksheet after all of your formulas and input cells are already in place and working. The table only requires a single formula placed at the top of the "results column" and a column of data for your input. Highlight the table and select Data/Table, identify the related input cell used by your formulas and presto, the results appear.
These results are live and will change if you change the numbers in the input column or any other input cell related to your formulas. Also, you can use this table to produce a graph of your results.
RE: Creating a table of results