Hello
Thank you for your Help and everytime I found my sollution with you
My situation today with my code Vba with My costum Function
I need in my calculation that every time I add a power of my rate 15 Times
so, the Excel Formula is ;
This code gave my this result =
and VBA code gave me :
with this Code VBA
-----------
I know there is a mistake in my code VBA ,
So I need your help, and Will be very thankfull even without help
Thank you for your Help and everytime I found my sollution with you
My situation today with my code Vba with My costum Function
Cell Formulas | ||
---|---|---|
Range | Formula | |
B3 | B3 | =+G3/$G$11 |
C3 | C3 | =+(POWER($B$3,0)+POWER($B$3,1)+POWER($B$3,2)+POWER($B$3,3)+POWER($B$3,4)+POWER($B$3,5)+POWER($B$3,6)+POWER($B$3,7)+POWER($B$3,8)+POWER($B$3,9)+POWER($B$3,10)+POWER($B$3,11)+POWER($B$3,12)+POWER($B$3,13)+POWER($B$3,14)+POWER($B$3,15)) |
D3 | D3 | =+puissance2(B3) |
I need in my calculation that every time I add a power of my rate 15 Times
so, the Excel Formula is ;
Excel Formula:
=+(PUISSANCE($B$3;0)+PUISSANCE($B$3;1)+PUISSANCE($B$3;2)+PUISSANCE($B$3;3)+PUISSANCE($B$3;4)+PUISSANCE($B$3;5)+PUISSANCE($B$3;6)+PUISSANCE($B$3;7)+PUISSANCE($B$3;8)+PUISSANCE($B$3;9)+PUISSANCE($B$3;10)+PUISSANCE($B$3;11)+PUISSANCE($B$3;12)+PUISSANCE($B$3;13)+PUISSANCE($B$3;14)+PUISSANCE($B$3;15))
This code gave my this result =
118,3891% |
and VBA code gave me :
100,0000% |
VBA Code:
Public Function puissance2(Taux_CPrincpal As Double) As Double
On Error Resume Next
Dim x As Double
puissance2 = Taux_CPrincpal
For x = 1 To 15
puissance2 = Application.Power(Taux_CPrincpal, 0) + Application.Power(Taux_CPrincpal, x)
Next x
End Function
-----------
I know there is a mistake in my code VBA ,
So I need your help, and Will be very thankfull even without help