G
Guest
I am tring to use the NPV function without success. How can one generate NPV
in Access without VBA coding?
Thanks
in Access without VBA coding?
Thanks
How can one generate NPV
in Access without VBA coding?
Hi John,
Thanks for your quick response. Is there a link I can access that would give
me more information?
I notice that in doing a Query by Design, in the Expression Builder,
Built-In Functions there is a reverence to NPV.
The argument is NPV(rate,ValueArray). How would one use that option? or,
does it still lead back to VBA Coding or Referencing Excel?
smck said:Hi John,
Thanks for your quick response. Is there a link I can access that would give
me more information?
I notice that in doing a Query by Design, in the Expression Builder,
Built-In Functions there is a reverence to NPV.
The argument is NPV(rate,ValueArray). How would one use that option? or,
does it still lead back to VBA Coding or Referencing Excel?
There
was another hurdle with the double array required by NPV so I had to get
creative.
John said:Thanks so much, James! I have no taste for accounting and wouldn't have known
where to start.
John W. Vinson [MVP]
James said:Either method would force me
to use the definition of PV in the query SQL itself instead of using the
NPV function. Each payment would make its own contribution to the NPV
that SUM can aggregate. That seems a lot more useful. I'll try to post
something further by Monday night.
To see if at least one negative value exists in the table:
SELECT IIf(Sum(Abs([PaymentAmount] < 0)) > 0, "It's True", "It's False")
AS NegativeExists FROM tblCashPayments;
Jamie said:To see if at least one negative value exists in the table:
SELECT IIf(Sum(Abs([PaymentAmount] < 0)) > 0, "It's True", "It's False")
AS NegativeExists FROM tblCashPayments;
For interest:
SELECT MIN(ABS(PaymentAmount)) <> MIN(PaymentAmount)
AS NegativeExists
FROM tblCashPayments;
Jamie.
--
James said:Jamie said:To see if at least one negative value exists in the table:
SELECT IIf(Sum(Abs([PaymentAmount] < 0)) > 0, "It's True", "It's False")
AS NegativeExists FROM tblCashPayments;
For interest:
SELECT MIN(ABS(PaymentAmount)) <> MIN(PaymentAmount)
AS NegativeExists
FROM tblCashPayments;
Jamie.
--
What if the minimum PaymentAmount value in the table is 0 (Note: this
situation shouldn't be allowed anyway)?
smck wrote:
I didn't test to see if the value is correct. Perhaps the loop needs to
start at 0 instead of 1 and go up to UBound(arr()). Unlike the Excel
version, the cash flow values aren't limited to 29 values. I'm not sure
that the calling convention I used helps in a practical way. Maybe I'll
test it and fix it up later if necessary.
James A. Fortune
(e-mail address removed)