NPV Fonksiyonu [VBA]

Sağlanan iskonto oranına, bir dizi mevduat ve para çekme işlemine dayanan bir yatırımın Net Bugünkü Değerini hesaplar.

warning

This function or constant is enabled with the statement Option VBASupport 1 placed before the executable program code in a module.


Sözdizimi:


NPV (Rate as Double, Values() as Double)

Dönüş değeri:

Double

Parametreler:

Oran bir dönem için iskonto oranıdır.

Değerler() mevduatları (pozitif değerler) veya para çekme durumlarını (negatif değerler) temsil eden bir dizidir.

Hata kodları:

5 Geçersiz yordam çağrısı

Örnek:


REM ***** BASIC *****
Option VBASupport 1
Sub ExampleNPV
 Dim r As Double
 Dim pValues(5) as Double
 pValues(0) = 100
 pValues(1) = 100
 pValues(2) = 100
 pValues(3) = -300
 pValues(4) = 100
 pValues(5) = 100
 r = 0.06
 p = NPV( r, pValues)
 Print p ' 174,894967305331 döndürür
End Sub

Please support us!