Excel按权重产生随机数怎么编辑公式答:23),RANDBETWEEN(10,19)))如果要小数:=IF(RAND()<=0.05,RANDBETWEEN(6,9)+RAND(),IF(RAND()>=0.95,RANDBETWEEN(20,23)+RAND(),RANDBETWEEN(10,19)+RAND()))函数RAND():生成[0,1)区间(前闭后开的区间)的随机小数。函数RANDBETWEEN(M,N):生成[M,N]区间(闭区间)的随机整数。
如何设计一个excel随机函数,生成1-31之间的随机整数,但剔除一些特定整数...答:用VBA代码如下(不会重复,不会出现特定数10):Sub rnd()Dim a As Integer, b As Integer, c As Integer T1:a = Application.RandBetween(1, 31)b = Application.RandBetween(1, 31)c = Application.RandBetween(1, 31)If Application.Or(a = b, a = c, b = c,a=10,b=10,c=10) ...