Conteúdo
Índice 🔎︎

# Rate Function [VBA]

Devolve a taxa de juros de um empréstimo ou investimento.

Esta função ou constante é ativada com a instrução Option VBASupport 1 colocada antes do código de programa executável num módulo.

### Sintaxe:

    Rate( NPer as Double, Pmt as Double, PV as Double [FV as Variant], [Due as Variant], [Guess as Variant] )

### Valor de retorno:

Double

### Parâmetros:

NPer is the total number of periods, during which annuity is paid.

Pmt is the regular payment made per period.

VA é o valor atual do empréstimo ou investimento.

VF (opcional) é o valor futuro do empréstimo ou investimento.

Due (optional) defines whether the payment is due at the beginning or the end of a period.

0 - the payment is due at the end of the period;

1 - the payment is due at the beginning of the period.

Guess(optional) determines the estimated value of the interest with iterative calculation.

## Códigos de erro

5 Chamada de procedimento inválido

### Exemplo:

    REM ***** BASIC *****
    Option VBASupport 1
    Sub ExampleRate
    ' Calculate the interest rate required to pay off a loan of $100,000 over
    ' 6 years, with payments of $1,500, due at the end of each month.
     Dim mRate As Double
     mRate = Rate( 72, -1500, 100000 )
     print mRate' mRate is calculated to be 0.00213778025343334
    End sub

Tópicos relacionados

RATE function in CALC

Funções financeiras do VBA