-
Beta Was this translation helpful? Give feedback.
Answered by
govert
Dec 29, 2022
Replies: 1 comment
-
If you mark your function as volatile with
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
schebotar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you mark your function as volatile with
[ExcelFunction(IsVolatile=true)]
it will recalculate and return a new value every time the sheet calculates, just like the built-in=RAND()
function.To get a good distribution of random numbers, you should also create one instance of the .NET 'Random' class, and use that one repeatedly.