A simple way is to use VBA, not a complicated regression method. You can do this with several variables and get multiple results .
Table (sheet1):
x1 is cell A1 in VBA sheet1.cells(1,1) x2 is cell B1 in VBA sheet1.cells(1,2) x3 is cell C1 in VBA sheet1.cells(1,3) z is cell D1 in VBA sheet1.cells(1,4)
Settlements on the 2nd sheet (sheet 2);
cell A1 = x1 (variable; input for formulas) cell A2 = x2 (variable; input for formulas) cell A3 = x3 (variable; input for formulas) cell A4 = z1 (result)
Create a button and enter the code in VBA
Private Sub CommandButton1_Click() 'rowCount is numbers of rows in your table(list1) for m = 0 to rowCount-1 'set table data to calculations 'set x1 sheet2.Cells(1, 1) = sheet1.Cells(2 + m, 1) 'set x2 sheet2.Cells(1, 2) = sheet1.Cells(2 + m, 2) 'set x3 sheet2.Cells(1, 3) = sheet1.Cells(2 + m, 3) 'get z sheet1.Cells(2 + m, 4) = sheet2.Cells(1, 4) next m End Sub
Mirko Tipka
source share