Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a piece of code, which is supposed to calculate the value of a series of payments in a particular time, taking into account the current market value of the fund. The variable FundValue does not seem to work however, so nothing appears in Excel. Function FundValue(RowValue As Integer, curPrice As Double) Dim x As Integer Dim payment, units, price, curValue As Double curValue = 0 payment = 0 price = 0 For x = 2 To x = RowValue payment = Cells(x, 6) price = Cells(x, 3) units = payment / price curValue = curValue + units * curPrice Next x FundValue = curValue End Function -- Thanks, Pertti |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Question-user defined function | Excel Programming | |||
Question about variable scope | Excel Programming | |||
Variable scope question w/combo-box, 2ND try | Excel Programming | |||
Variable scope question w/combo-box | Excel Programming | |||
How to copy worksheets with a user defined variable | Excel Programming |