NPV = C0 + C1 / (1+r) + C2 / (1+r)2 + ... + Cn / (1+r)n
so something like
if:
values is an array of rates and
rate is the rate
then:
<cfset NPV = values[1]>
<cfloop from=2 to=#ArrayLen(values)# index=C>
<cfset temp =0>
<cfset temp = Value[c]/(1+rate) ^ c>
<cfset NPV + temp>
</cfloop>
Let me know how you get on, and I'll create a custom tag for it .....
~Justin MacCarthy
----- Original Message -----
From: "Johnson, Dana" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 01, 2000 2:43 PM
Subject: Net Present Value NPV()
> does anybody have a workaround for the VB function NPV() for use in cold
> fusion.
>
> Dana E. Johnson
> Sr. Web Developer
> CIT
> VTF/Technology Financing Services
> [EMAIL PROTECTED]
> (904) 620-7458
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.