Вы находитесь на странице: 1из 5

Para Intereses:

Interpolación Lineal
Intereses
7%
Lo que se desea buscar 7.30%
8%

Para periodos:

Periodos
45
Lo que se desea buscar 48
50

Aplicando Función Excel

Intereses:
Intereses(x) Valor de la Tabla(y)
7% 0.14238
8% 0.14903

Calcular: 7.30%

=interpolar(Valor buscado);rango de valo


Valor de la Tabla
0.14238
0.144375
0.14903

Valor de la Tabla
0.1712
0.1529
0.1407

Periodos:
Periodos(x)
0.144375 45
50

Calcular:

o);rango de valores de X;rango de valores de Y)


Valor de la Tabla(y)
0.1712 0.1529
0.1407

48
Function INTERPOLAR(valor_buscado As Double, matriz_buscar_en As Range, matriz_resultado As Range) As Double
nElementos = matriz_buscar_en.Count
For i = 1 To nElementos - 1
If valor_buscado >= matriz_buscar_en(i) And valor_buscado <= matriz_buscar_en(i + 1) Then
a = matriz_buscar_en(i)
b = matriz_buscar_en(i + 1)
m = matriz_resultado(i)
n = matriz_resultado(i + 1)
x = valor_buscado
INTERPOLAR = m + (m - n) / (a - b) * (x - a)
Exit Function
ElseIf valor_buscado <= matriz_buscar_en(i) And valor_buscado >= matriz_buscar_en(i + 1) Then
a = matriz_buscar_en(i)
b = matriz_buscar_en(i + 1)
m = matriz_resultado(i)
n = matriz_resultado(i + 1)
x = valor_buscado
INTERPOLAR = m + (m - n) / (a - b) * (x - a)
Exit Function
Else
End If

Next
End Function
tado As Range) As Double

hen

1) Then

Вам также может понравиться