, , . , , , , Google, "" .. . Excel , , , #.
, , Excel-:
1) . , , , . , , .
=B2+C2
E2, E. Excel , E3 = B3 + C3 ..
. Excel , .
2) UDF VBA . UDF - , . . UDF, - . ( , forumla Range Excel " " DRY-).
, UDF ( , ), ββ VBA:
Public Function myUDF(current, oneYear)
myUDF = current + oneYear
End Function
=myUDF(B2, C2)
E2 E.
, , . , "Excel", UDF. , Excel, .
EDIT:
2.5) Excel. , , , , , , Excel "-", . " " , , , . Excel, , , . :
http://office.microsoft.com/en-us/excel-help/calculate-multiple-results-by-using-a-data-table-HP010072656.aspx
:
- , , (: A , , , . (=).) . .
3) , , . , , VBA, , Excel, VBA . , :
Public Sub doCalc()
'for each cell in the result column
'copy the corresponding current and oneYear cells to the calc sheet
'Excel will recalc the calc sheet
'copy the result cell on the calc sheet back to the Range sheet in the right place
'end
End Sub
"Excel-", , . "", . ( , Worksheet.)
, Excel, , Excel , , - .
:
O.K., , (3) , , VBA #. (, , EH ..) , , VBA:
-, VBA, UDF. , Sub, , . , - :
Public Sub fakeFunct(input1, input2, outputRng As Range)
CalcSheet.[b1] = input1
CalcSheet.[b2] = input2
'Excel recalcs what in cell B3 if you have it set to automatic recalcualation
outputRng = CalcSheet.[b3]
End Sub
"CalcSheet" - " " . ( . -: http://www.cpearson.com/excel/codemods.htm)
, "":
Public Sub loopFakeFunct()
Dim i As Long
For i = 2 To 2000
Call fakeFunct(RangeSheet.Cells(i, 2), RangeSheet.Cells(i, 3), RangeSheet.Cells(i, 5))
Next i
End Sub
, , Worksheet_Change .. , VBA, , . ( "RangeSheet" "Range" , Range Application.Range, Excel.)
4) , UDF, (2). , , , , ++ - , XLL.
5) , Microsoft:
http://research.microsoft.com/en-us/um/people/simonpj/papers/excel/excel.htm
6) Resolver One:
http://www.resolversystems.com/products/resolver-one/
, , , Python.