P
paul
number,x, from cell A3 and a positive integer, n, from cell B3 then
returns into cell C3 the value of x raised to the power n divided by
n factorial.
where x in cell a3 = 2 and n in cell b3 = 5
im using this formula, but when i run it nothing happens, how do i
make this vba programme run and return the value?
the vba programmes ok its just no running anything or doing anything
to my spreadsheet
this is the vba programme:
Public Function MyFunction(X As Double, N As Long) As Variant
If (N <= 0&) _
Then
MyFunction = "N must be an integer greater than zero"
Else
MyFunction = (X ^ N) / WorksheetFunction.Fact(N)
End If
End Function
returns into cell C3 the value of x raised to the power n divided by
n factorial.
where x in cell a3 = 2 and n in cell b3 = 5
im using this formula, but when i run it nothing happens, how do i
make this vba programme run and return the value?
the vba programmes ok its just no running anything or doing anything
to my spreadsheet
this is the vba programme:
Public Function MyFunction(X As Double, N As Long) As Variant
If (N <= 0&) _
Then
MyFunction = "N must be an integer greater than zero"
Else
MyFunction = (X ^ N) / WorksheetFunction.Fact(N)
End If
End Function