Hi, I have the following formula working out a random Yes / No based on some probability.
In B23 I have the following code (it sits in a table)
However as more data gets added below A23, it recalculates.
What I'm looking for is a static calculation, so that when A23 is populated B23 calcs once. Then when A24 is populated B24 calculates, but B23 remains static and does not change.
I've got the following vba code in a module and B23 has =StaticRand5. It works for this but how do I get it to do the
any help would be appreciated. Thanks S
In B23 I have the following code (it sits in a table)
Code:
=IF(A23="","",INDEX($A$2:$A$3,COUNTIF($C$2:$C$3,"<="&RAND())+1))
However as more data gets added below A23, it recalculates.
What I'm looking for is a static calculation, so that when A23 is populated B23 calcs once. Then when A24 is populated B24 calculates, but B23 remains static and does not change.
I've got the following vba code in a module and B23 has =StaticRand5. It works for this but how do I get it to do the
Code:
=IF(A23="","",INDEX($A$2:$A$3,COUNTIF($C$2:$C$3,"<="&RAND())+1))
Code:
Function StaticRand5() As Double
StaticRand5 = Int((20 - 1 + 1) * Rnd() + 1)
End Function
any help would be appreciated. Thanks S