陆良浩腾脚垫制作 发表于 2021-12-8 19:43:00

请教大佬,如何用公式,把原始数按已知要生成的个数,随机生成出来,谢谢! ...

果合坊坚果 发表于 2021-12-16 13:48:49

F2供参考
=TEXTJOIN(",",,MOD(AGGREGATE(15,6,RANDBETWEEN(ROW(1:99)^0,99)/1%+FILTERXML("<a><b>"&SUBSTITUTE(D2,",","</b><b>")&"</b></a>","//b"),ROW(INDIRECT("1:"&E2))),100))

大老齐 发表于 2022-1-16 06:15:43

C2数组公式:
=TEXTJOIN(",",,MOD(SMALL(IF(ISNUMBER(FIND(","&ROW($1:$99)&",",","&A2&",")),RANDBETWEEN(-V1:V99,99)/1%+ROW($1:$99)),ROW(INDIRECT("1:"&B2))),100))

梦中的信仰 发表于 2022-1-20 21:25:09


=TEXTJOIN(",",,INDEX(EVALUATE("{"&A2&"}"),N(IF({1},MOD(SMALL(RANDBETWEEN(ROW(INDIRECT("1:"&B2))^0,B2)/1%+ROW(INDIRECT("1:"&B2)),ROW(INDIRECT("1:"&B2))),100)))))
WPS可行。。EXCEL将EVALUATE("{"&A2&"}") 此部分定义名称即可!
页: [1]
查看完整版本: 请教大佬,如何用公式,把原始数按已知要生成的个数,随机生成出来,谢谢! ...