Excel中是否有公式从值列表中选择随机值?例如,我希望单元格从"Yes, No, Maybe".
Answer
Yes
No
Maybe
Yes
答案 0 :(得分:4)
考虑:
=CHOOSE(RANDBETWEEN(1,3),"Yes","No","Maybe")
修改#1:强>
结果的分布可以“加权”(直到某一点)。考虑:
=CHOOSE(RANDBETWEEN(1,4),"Yes","Yes","No","Maybe")
这会产生两次 否的没有或可能的 p>
这有点粗糙..............另请注意, CHOOSE()可以处理多少项的限制!